Skip to content

Commit 6066e42

Browse files
committed
Add version numbers to generated artifacts in crazy fun
1 parent 5a5851a commit 6066e42

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

Rakefile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,16 +513,20 @@ task :release => JAVA_RELEASE_TARGETS + [
513513
] do |t|
514514
puts t.prerequisites.join(', ')
515515

516-
t.prerequisites.each do |p|
517-
if JAVA_RELEASE_TARGETS.include?(p)
518-
Buck::buck_cmd.call('publish', ['--dry-run', '--remote-repo', 'https://oss.sonatype.org/service/local/staging/deploy/maven2', p])
519-
end
520-
end
516+
t.prerequisites.each do |p|
517+
if JAVA_RELEASE_TARGETS.include?(p)
518+
Buck::buck_cmd.call('publish', ['--dry-run', '--remote-repo', 'https://oss.sonatype.org/service/local/staging/deploy/maven2', p])
519+
end
520+
end
521521

522522
mkdir_p "build/dist"
523523
cp Rake::Task['//java/server/src/org/openqa/grid/selenium:selenium'].out, "build/dist/selenium-server-standalone-#{version}.jar"
524524
cp Rake::Task['//java/server/src/org/openqa/grid/selenium:selenium:zip'].out, "build/dist/selenium-server-#{version}.zip"
525+
`jar uf build/dist/selenium-server-#{version}.zip NOTICE LICENSE`
526+
`cd java && jar uf ../build/dist/selenium-server-#{version}.zip CHANGELOG`
525527
cp Rake::Task['//java/client/src/org/openqa/selenium:client-combined:zip'].out, "build/dist/selenium-java-#{version}.zip"
528+
`jar uf build/dist/selenium-java-#{version}.zip NOTICE LICENSE`
529+
`cd java && jar uf ../build/dist/selenium-server-#{version}.zip CHANGELOG`
526530
end
527531

528532
def read_user_pass_from_m2_settings

rake-tasks/buck.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,12 @@ def buck(*args, &block)
204204
first_party.each do |jar|
205205
sh "cd #{working_dir}/uber && jar xf #{jar}"
206206
end
207-
sh "cd #{working_dir}/uber && jar cMf ../#{target}-nodeps.jar *"
207+
208+
# TODO: Don't do this. It's sinful.
209+
version = File.open('SELENIUM_VERSION', &:gets).chomp
210+
version = eval(version)
211+
212+
sh "cd #{working_dir}/uber && jar cMf ../#{target}-#{version}-nodeps.jar *"
208213
# TODO: Get the sources of all deps too and build the -src.jar
209214
rm_rf "#{working_dir}/uber"
210215

0 commit comments

Comments
 (0)