@@ -50,12 +50,10 @@ $DEBUG = true if ENV['debug'] == 'true'
50
50
51
51
verbose ( $DEBUG)
52
52
53
- def release_version
54
- '4.16'
55
- end
56
-
57
- def version
58
- "#{ release_version } .0-SNAPSHOT"
53
+ def java_version
54
+ File . foreach ( 'java/version.bzl' ) do |line |
55
+ return line . split ( '=' ) . last . strip . tr ( '"' , '' ) if line . include? ( 'SE_VERSION' )
56
+ end
59
57
end
60
58
61
59
# The build system used by webdriver is layered on top of rake, and we call it
@@ -332,21 +330,21 @@ task 'prep-release-zip': [
332
330
'//java/src/org/openqa/selenium/grid:executable-grid' ,
333
331
] do
334
332
[
335
- "build/dist/selenium-server-#{ version } .zip" ,
336
- "build/dist/selenium-java-#{ version } .zip" ,
337
- "build/dist/selenium-server-#{ version } .jar"
333
+ "build/dist/selenium-server-#{ java - version } .zip" ,
334
+ "build/dist/selenium-java-#{ java - version } .zip" ,
335
+ "build/dist/selenium-server-#{ java - version } .jar"
338
336
] . each do |f |
339
337
rm_f ( f ) if File . exists? ( f )
340
338
end
341
339
342
340
mkdir_p 'build/dist'
343
341
File . delete
344
- cp "bazel-bin/java/src/org/openqa/selenium/grid/server-zip.zip" , "build/dist/selenium-server-#{ version } .zip" , preserve : false
345
- chmod 0666 , "build/dist/selenium-server-#{ version } .zip"
346
- cp "bazel-bin/java/src/org/openqa/selenium/client-zip.zip" , "build/dist/selenium-java-#{ version } .zip" , preserve : false
347
- chmod 0666 , "build/dist/selenium-java-#{ version } .zip"
348
- cp "bazel-bin/java/src/org/openqa/selenium/grid/selenium" , "build/dist/selenium-server-#{ version } .jar" , preserve : false
349
- chmod 0666 , "build/dist/selenium-server-#{ version } .jar"
342
+ cp "bazel-bin/java/src/org/openqa/selenium/grid/server-zip.zip" , "build/dist/selenium-server-#{ java - version } .zip" , preserve : false
343
+ chmod 0666 , "build/dist/selenium-server-#{ java - version } .zip"
344
+ cp "bazel-bin/java/src/org/openqa/selenium/client-zip.zip" , "build/dist/selenium-java-#{ java - version } .zip" , preserve : false
345
+ chmod 0666 , "build/dist/selenium-java-#{ java - version } .zip"
346
+ cp "bazel-bin/java/src/org/openqa/selenium/grid/selenium" , "build/dist/selenium-server-#{ java - version } .jar" , preserve : false
347
+ chmod 0777 , "build/dist/selenium-server-#{ java - version } .jar"
350
348
end
351
349
352
350
task 'release-java' : %i[ prep-release-zip publish-maven ]
387
385
388
386
task 'publish-maven-snapshot' : JAVA_RELEASE_TARGETS do
389
387
creds = read_m2_user_pass
390
- if version . end_with? ( '-SNAPSHOT' )
388
+ if java - version . end_with? ( '-SNAPSHOT' )
391
389
JAVA_RELEASE_TARGETS . each do |p |
392
390
Bazel ::execute ( 'run' , [ '--stamp' , '--define' , 'maven_repo=https://oss.sonatype.org/content/repositories/snapshots' , '--define' , "maven_user=#{ creds [ 0 ] } " , '--define' , "maven_password=#{ creds [ 1 ] } " , '--define' , 'gpg_sign=false' ] , p )
393
391
end
0 commit comments