Skip to content

Commit

Permalink
Adding release-v3 crazyfun target
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Oct 16, 2015
1 parent 08eb846 commit 8b79cbd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
51 changes: 51 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,57 @@ task :release => [
cp "build/java/client/src/org/openqa/selenium/client-combined.zip", "build/dist/selenium-java-#{version}.zip"
end

task "release-v3" => [
:clean,
:build,
'//java/server/src/org/openqa/selenium/remote/server:server:zip',
'//java/server/src/org/openqa/grid/selenium:selenium-v3:zip',
'//java/client/src/org/openqa/selenium:client-combined-v3-without-htmlunit:zip',
'//java/client/src/org/openqa/selenium:client-combined-v3:zip',
] do |t|
# Unzip each of the deps and rename the pieces that need renaming
renames = {
"client-combined-v3-nodeps-srcs.jar" => "selenium-java-v3-#{version}-srcs.jar",
"client-combined-v3-nodeps.jar" => "selenium-java-v3-#{version}.jar",
"selenium-v3-nodeps-srcs.jar" => "selenium-server-v3-#{version}-srcs.jar",
"selenium-v3-nodeps.jar" => "selenium-server-v3-#{version}.jar",
"selenium-v3-standalone.jar" => "selenium-server-v3-standalone-#{version}.jar",
}

t.prerequisites.each do |pre|
zip = Rake::Task[pre].out

next unless zip =~ /\.zip$/

temp = zip + "rename"
rm_rf temp
deep = File.join(temp, "/selenium-#{version}")
mkdir_p deep
cp "java/CHANGELOG", deep
cp "NOTICE", deep
cp "LICENSE", deep

sh "cd #{deep} && jar xf ../../#{File.basename(zip)}"
renames.each do |from, to|
src = File.join(deep, from)
next unless File.exists?(src)

mv src, File.join(deep, to)
end
rm_f File.join(deep, "client-combined-v3-standalone.jar")
rm zip
sh "cd #{temp} && jar cMf ../#{File.basename(zip)} *"

rm_rf temp
end

mkdir_p "build/dist"
cp "build/java/server/src/org/openqa/grid/selenium/selenium-v3-standalone.jar", "build/dist/selenium-server-v3-standalone-#{version}.jar"
cp "build/java/server/src/org/openqa/grid/selenium/selenium-v3.zip", "build/dist/selenium-server-v3-#{version}.zip"
cp "build/java/client/src/org/openqa/selenium/client-combined-v3.zip", "build/dist/selenium-java-v3-#{version}.zip"
cp "build/java/client/src/org/openqa/selenium/client-combined-v3-without-htmlunit.zip", "build/dist/selenium-java-v3-without-htmlunit-#{version}.zip"
end

task :push_release => [:release] do
py = "java -jar third_party/py/jython.jar"
if (python?)
Expand Down
12 changes: 11 additions & 1 deletion java/client/src/org/openqa/selenium/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,20 @@ java_library(name = "webdriver-api",

java_library(name = "client-combined",
deps = [
":client-combined-v3",
"//java/client/src/com/thoughtworks/selenium:leg-rc",
"//java/client/src/com/thoughtworks/selenium/webdriven:webdriven",
"//java/client/src/org/openqa/selenium/chrome",
])

java_library(name = "client-combined-v3",
deps = [
":client-combined-v3-without-htmlunit",
"//java/client/src/org/openqa/selenium/htmlunit",
])

java_library(name = "client-combined-v3-without-htmlunit",
deps = [
"//java/client/src/org/openqa/selenium/chrome",
"//java/client/src/org/openqa/selenium/firefox",
"//java/client/src/org/openqa/selenium/edge",
"//java/client/src/org/openqa/selenium/ie",
Expand Down

0 comments on commit 8b79cbd

Please sign in to comment.