Skip to content

Instantly share code, notes, and snippets.

@janhenrik
Created September 20, 2012 10:54
Show Gist options
  • Save janhenrik/3755210 to your computer and use it in GitHub Desktop.
Save janhenrik/3755210 to your computer and use it in GitHub Desktop.
artifactory
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