@@ -31,8 +31,9 @@ var binaries = {
31
31
isDefault : true ,
32
32
prefix : 'selenium-server-standalone' ,
33
33
filename : 'selenium-server-standalone-' + versions . selenium + '.jar' ,
34
+ cdn : 'https://selenium-release.storage.googleapis.com/' ,
34
35
url : function ( ) {
35
- return 'https://selenium-release.storage.googleapis.com/' +
36
+ return this . cdn +
36
37
shortVersion ( versions . selenium ) + '/' +
37
38
'selenium-server-standalone-' + versions . selenium + '.jar' ;
38
39
}
@@ -42,8 +43,9 @@ var binaries = {
42
43
isDefault : true ,
43
44
prefix : 'chromedriver_' ,
44
45
filename : 'chromedriver_' + versions . chromedriver + '.zip' ,
46
+ cdn : 'https://chromedriver.storage.googleapis.com/' ,
45
47
url : function ( ) {
46
- var urlPrefix = 'https://chromedriver.storage.googleapis.com/' +
48
+ var urlPrefix = this . cdn +
47
49
versions . chromedriver + '/chromedriver_' ;
48
50
if ( os . type ( ) == 'Darwin' ) {
49
51
return urlPrefix + 'mac32.zip' ;
@@ -63,8 +65,9 @@ var binaries = {
63
65
isDefault : false ,
64
66
prefix : 'IEDriverServer' ,
65
67
filename : 'IEDriverServer_' + versions . iedriver + '.zip' ,
68
+ cdn : 'https://selenium-release.storage.googleapis.com/' ,
66
69
url : function ( ) {
67
- var urlPrefix = 'https://selenium-release.storage.googleapis.com/' +
70
+ var urlPrefix = this . cdn +
68
71
shortVersion ( versions . iedriver ) + '/IEDriverServer' ;
69
72
if ( os . type ( ) == 'Windows_NT' ) {
70
73
if ( os . arch ( ) == 'x64' ) {
@@ -88,7 +91,8 @@ var cli = optimist.
88
91
describe ( 'seleniumPort' , 'Optional port for the selenium standalone server' ) .
89
92
describe ( 'ignore_ssl' , 'Ignore SSL certificates' ) . boolean ( 'ignore_ssl' ) .
90
93
default ( 'ignore_ssl' , false ) .
91
- describe ( 'proxy' , 'Proxy to use for the install or update command' ) ;
94
+ describe ( 'proxy' , 'Proxy to use for the install or update command' ) .
95
+ describe ( 'alternate_cdn' , 'Alternate CDN to the binaries' ) ;
92
96
93
97
for ( bin in binaries ) {
94
98
cli . describe ( bin , 'Install or update ' + binaries [ bin ] . name ) .
@@ -221,6 +225,7 @@ var existingFiles = fs.readdirSync(argv.out_dir);
221
225
222
226
for ( name in binaries ) {
223
227
bin = binaries [ name ] ;
228
+ bin . cdn = argv . alternate_cdn || bin . cdn ;
224
229
var exists = fs . existsSync ( path . join ( argv . out_dir , bin . filename ) ) ;
225
230
var outOfDateExists = false ;
226
231
existingFiles . forEach ( function ( file ) {
0 commit comments