class Bump::CLI::Commands::Deploy

Public Instance Methods

call(file:, **options) click to toggle source
# File lib/bump/cli/commands/deploy.rb, line 19
def call(file:, **options)
  with_errors_rescued do
    response = post(
      url: API_URL + "/versions",
      body: body(file, **options).to_json,
      token: options[:token]
    )

    if response.code == 201
      puts "The new version is currently being processed."
    elsif response.code == 204
      puts "This version has already been deployed."
    else
      display_error(response)
    end
  end
end