lib/stan/deployer.rb in stan-0.2.4 vs lib/stan/deployer.rb in stan-0.3.0

- old
+ new

@@ -1,10 +1,10 @@ require 'typhoeus' module Stan class Deployer def self.deploy(source, name, keep: false) - url = ENV.fetch('STAN_SERVER') + url = ENV.fetch('STAN_SERVER') puts "Going to deploy `#{name}` to #{url}" res = Typhoeus.post( "#{url}/upload", body: { name: name, @@ -12,13 +12,14 @@ }, followlocation: true ) if res.success? puts "Successfully deployed `#{name}`" - puts "Your site should be reachable at `#{url}/#{name}`" + puts "Your site should be reachable at `#{url}/#{name}`" else puts "Something went wrong. (#{res.response_code})" - puts res.inspect if Stan::CI + puts res.inspect if Stan::CI + exit 1 end FileUtils.rm(source) unless keep end end end