Skip to content

Commit

Permalink
Fix rakefile to use the correct variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Dec 6, 2023
1 parent 1540045 commit f08db9c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -330,21 +330,21 @@ task 'prep-release-zip': [
'//java/src/org/openqa/selenium/grid:executable-grid',
] do
[
"build/dist/selenium-server-#{java-version}.zip",
"build/dist/selenium-java-#{java-version}.zip",
"build/dist/selenium-server-#{java-version}.jar"
"build/dist/selenium-server-#{java_version}.zip",
"build/dist/selenium-java-#{java_version}.zip",
"build/dist/selenium-server-#{java_version}.jar"
].each do |f|
rm_f(f) if File.exists?(f)
end

mkdir_p 'build/dist'
File.delete
cp "bazel-bin/java/src/org/openqa/selenium/grid/server-zip.zip", "build/dist/selenium-server-#{java-version}.zip", preserve: false
chmod 0666, "build/dist/selenium-server-#{java-version}.zip"
cp "bazel-bin/java/src/org/openqa/selenium/client-zip.zip", "build/dist/selenium-java-#{java-version}.zip", preserve: false
chmod 0666, "build/dist/selenium-java-#{java-version}.zip"
cp "bazel-bin/java/src/org/openqa/selenium/grid/selenium", "build/dist/selenium-server-#{java-version}.jar", preserve: false
chmod 0777, "build/dist/selenium-server-#{java-version}.jar"
cp "bazel-bin/java/src/org/openqa/selenium/grid/server-zip.zip", "build/dist/selenium-server-#{java_version}.zip", preserve: false
chmod 0666, "build/dist/selenium-server-#{java_version}.zip"
cp "bazel-bin/java/src/org/openqa/selenium/client-zip.zip", "build/dist/selenium-java-#{java_version}.zip", preserve: false
chmod 0666, "build/dist/selenium-java-#{java_version}.zip"
cp "bazel-bin/java/src/org/openqa/selenium/grid/selenium", "build/dist/selenium-server-#{java_version}.jar", preserve: false
chmod 0777, "build/dist/selenium-server-#{java_version}.jar"
end

task 'release-java': %i[prep-release-zip publish-maven]
Expand Down Expand Up @@ -385,7 +385,7 @@ end

task 'publish-maven-snapshot': JAVA_RELEASE_TARGETS do
creds = read_m2_user_pass
if java-version.end_with?('-SNAPSHOT')
if java_version.end_with?('-SNAPSHOT')
JAVA_RELEASE_TARGETS.each do |p|
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)
end
Expand Down

0 comments on commit f08db9c

Please sign in to comment.