Skip to content

Commit 3735661

Browse files
committed
./go release now builds the maven artifacts for release
Well, almost all of them. Not the standalone server. For some reason, `buck publish` hangs indefinitely, which is less than ideal. For now we use `buck build` to allow the process of migration to continue. Interesting, when run out of the ./go command, `buck publish` works exactly as it should, so I suspect the problem is somewhere in how we hooked up the execution of Buck. *sigh*
1 parent 26eca99 commit 3735661

File tree

2 files changed

+55
-46
lines changed

2 files changed

+55
-46
lines changed

Rakefile

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -480,53 +480,62 @@ file "build/third_party/java/jetty/jetty-repacked.jar" => [
480480
cp "build/third_party/java/jetty/jetty-repacked.jar", "third_party/java/jetty/jetty-repacked.jar"
481481
end
482482

483-
task "release" => [
483+
#task "release" => [
484484
# :clean,
485-
:build,
486-
'//java/server/src/org/openqa/selenium/remote/server:server:zip',
487-
'//java/server/src/org/openqa/grid/selenium:selenium:zip',
488-
'//java/client/src/org/openqa/selenium:client-combined-v3:zip',
489-
] do |t|
490-
# Unzip each of the deps and rename the pieces that need renaming
491-
renames = {
492-
"client-combined-v3-nodeps-srcs.jar" => "selenium-java-#{version}-srcs.jar",
493-
"client-combined-v3-nodeps.jar" => "selenium-java-#{version}.jar",
494-
"selenium-nodeps-srcs.jar" => "selenium-server-#{version}-srcs.jar",
495-
"selenium-nodeps.jar" => "selenium-server-#{version}.jar",
496-
"selenium-standalone.jar" => "selenium-server-standalone-#{version}.jar",
497-
}
498-
499-
t.prerequisites.each do |pre|
500-
zip = Rake::Task[pre].out
501-
502-
next unless zip =~ /\.zip$/
503-
504-
temp = zip + "rename"
505-
rm_rf temp
506-
deep = File.join(temp, "/selenium-#{version}")
507-
mkdir_p deep
508-
cp "java/CHANGELOG", deep
509-
cp "NOTICE", deep
510-
cp "LICENSE", deep
511-
512-
sh "cd #{deep} && jar xf ../../#{File.basename(zip)}"
513-
renames.each do |from, to|
514-
src = File.join(deep, from)
515-
next unless File.exists?(src)
516-
517-
mv src, File.join(deep, to)
518-
end
519-
rm_f File.join(deep, "client-combined-v3-standalone.jar")
520-
rm zip
521-
sh "cd #{temp} && jar cMf ../#{File.basename(zip)} *"
522-
523-
rm_rf temp
485+
# :build,
486+
# '//java/server/src/org/openqa/selenium/remote/server:server:zip',
487+
# '//java/server/src/org/openqa/grid/selenium:selenium:zip',
488+
# '//java/client/src/org/openqa/selenium:client-combined-v3:zip',
489+
# ] do |t|
490+
# # Unzip each of the deps and rename the pieces that need renaming
491+
# renames = {
492+
# "client-combined-v3-nodeps-srcs.jar" => "selenium-java-#{version}-srcs.jar",
493+
# "client-combined-v3-nodeps.jar" => "selenium-java-#{version}.jar",
494+
# "selenium-nodeps-srcs.jar" => "selenium-server-#{version}-srcs.jar",
495+
# "selenium-nodeps.jar" => "selenium-server-#{version}.jar",
496+
# "selenium-standalone.jar" => "selenium-server-standalone-#{version}.jar",
497+
# }
498+
#
499+
# t.prerequisites.each do |pre|
500+
# zip = Rake::Task[pre].out
501+
#
502+
# next unless zip =~ /\.zip$/
503+
#
504+
# temp = zip + "rename"
505+
# rm_rf temp
506+
# deep = File.join(temp, "/selenium-#{version}")
507+
# mkdir_p deep
508+
# cp "java/CHANGELOG", deep
509+
# cp "NOTICE", deep
510+
# cp "LICENSE", deep
511+
#
512+
# sh "cd #{deep} && jar xf ../../#{File.basename(zip)}"
513+
# renames.each do |from, to|
514+
# src = File.join(deep, from)
515+
# next unless File.exists?(src)
516+
#
517+
# mv src, File.join(deep, to)
518+
# end
519+
# rm_f File.join(deep, "client-combined-v3-standalone.jar")
520+
# rm zip
521+
# sh "cd #{temp} && jar cMf ../#{File.basename(zip)} *"
522+
#
523+
# rm_rf temp
524+
# end
525+
#
526+
# mkdir_p "build/dist"
527+
# cp "build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar", "build/dist/selenium-server-standalone-#{version}.jar"
528+
# cp "build/java/server/src/org/openqa/grid/selenium/selenium.zip", "build/dist/selenium-server-#{version}.zip"
529+
# cp "build/java/client/src/org/openqa/selenium/client-combined-v3.zip", "build/dist/selenium-java-#{version}.zip"
530+
#end
531+
532+
task :release => JAVA_RELEASE_TARGETS do |t|
533+
puts t.prerequisites.join(', ')
534+
535+
t.prerequisites.each do |p|
536+
# Buck::buck_cmd.call('publish', "--dry-run --to-maven-central #{p}")
537+
Buck::buck_cmd.call('build', "#{p}")
524538
end
525-
526-
mkdir_p "build/dist"
527-
cp "build/java/server/src/org/openqa/grid/selenium/selenium-standalone.jar", "build/dist/selenium-server-standalone-#{version}.jar"
528-
cp "build/java/server/src/org/openqa/grid/selenium/selenium.zip", "build/dist/selenium-server-#{version}.zip"
529-
cp "build/java/client/src/org/openqa/selenium/client-combined-v3.zip", "build/dist/selenium-java-#{version}.zip"
530539
end
531540

532541
task :push_release => [:release] do

rake-tasks/buck.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def self.buck_cmd
5151
stdin.close
5252

5353
while line = stderr.gets
54-
if command == 'build' || command == 'test'
54+
if command == 'build' || command == 'publish' || command == 'test'
5555
puts line
5656
end
5757
err += line

0 commit comments

Comments
 (0)