Skip to content

Commit

Permalink
create ruby script to download latest release from https://github.com…
Browse files Browse the repository at this point in the history
…/groupon/Selenium-Grid-Extras/releases and update symlink SeleniumGridExtras-jar-with-dependencies.jar
  • Loading branch information
Valdis Victor Vitayaudom committed Nov 17, 2014
1 parent d338e14 commit 8bd05a1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions latest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/local/bin/ruby
require 'json'
require 'fileutils'

# assuming latest is first tag entry
latest_json = JSON.parse(`curl -s https://api.github.com/repos/groupon/Selenium-Grid-Extras/releases`)[0]

latest_json["assets"].each do |asset|
if asset["content_type"] == "application/java-archive"
system "curl -sL -o #{asset["name"]} #{asset["browser_download_url"]}" unless File.exist?(asset["name"])
FileUtils.ln_s asset["name"], 'SeleniumGridExtras-jar-with-dependencies.jar', :force => true if asset["name"] =~ /SeleniumGridExtras-(.*)-jar-with-dependencies.jar/
end
end

0 comments on commit 8bd05a1

Please sign in to comment.