Skip to content

Commit

Permalink
Add version numbers to generated artifacts in crazy fun
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jul 28, 2016
1 parent 5a5851a commit 6066e42
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
14 changes: 9 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -513,16 +513,20 @@ task :release => JAVA_RELEASE_TARGETS + [
] do |t|
puts t.prerequisites.join(', ')

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

mkdir_p "build/dist"
cp Rake::Task['//java/server/src/org/openqa/grid/selenium:selenium'].out, "build/dist/selenium-server-standalone-#{version}.jar"
cp Rake::Task['//java/server/src/org/openqa/grid/selenium:selenium:zip'].out, "build/dist/selenium-server-#{version}.zip"
`jar uf build/dist/selenium-server-#{version}.zip NOTICE LICENSE`
`cd java && jar uf ../build/dist/selenium-server-#{version}.zip CHANGELOG`
cp Rake::Task['//java/client/src/org/openqa/selenium:client-combined:zip'].out, "build/dist/selenium-java-#{version}.zip"
`jar uf build/dist/selenium-java-#{version}.zip NOTICE LICENSE`
`cd java && jar uf ../build/dist/selenium-server-#{version}.zip CHANGELOG`
end

def read_user_pass_from_m2_settings
Expand Down
7 changes: 6 additions & 1 deletion rake-tasks/buck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ def buck(*args, &block)
first_party.each do |jar|
sh "cd #{working_dir}/uber && jar xf #{jar}"
end
sh "cd #{working_dir}/uber && jar cMf ../#{target}-nodeps.jar *"

# TODO: Don't do this. It's sinful.
version = File.open('SELENIUM_VERSION', &:gets).chomp
version = eval(version)

sh "cd #{working_dir}/uber && jar cMf ../#{target}-#{version}-nodeps.jar *"
# TODO: Get the sources of all deps too and build the -src.jar
rm_rf "#{working_dir}/uber"

Expand Down

0 comments on commit 6066e42

Please sign in to comment.