Created
September 20, 2012 10:54
-
-
Save janhenrik/3755210 to your computer and use it in GitHub Desktop.
artifactory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printf "Laster opp #{local_file} til #{rest_of_path}..." | |
begin | |
res = RestClient.put(url, File.new(local_file)) | |
unless res.code >= 200 and res.code < 300 | |
raise "Opplasting til Artifactory svarte ikke med HTTP OK, feilmelding var: #{res.message}" | |
end | |
puts "Opplasting vellykket! Status: #{res.code}" | |
rescue => e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment