From decbf5b53259ee5590788b4abf7d96d99974cd39 Mon Sep 17 00:00:00 2001 From: Callum Pease Date: Mon, 25 Oct 2021 14:13:05 +0100 Subject: [PATCH 1/2] Adds serverside version as argument --- lib/ey-core/cli/deploy.rb | 8 ++++++++ lib/ey-core/models/deployment.rb | 1 + lib/ey-core/requests/deploy_environment_application.rb | 1 + 3 files changed, 10 insertions(+) diff --git a/lib/ey-core/cli/deploy.rb b/lib/ey-core/cli/deploy.rb index 4f950be..916431c 100644 --- a/lib/ey-core/cli/deploy.rb +++ b/lib/ey-core/cli/deploy.rb @@ -32,6 +32,11 @@ class Deploy < Subcommand long: "migrate", description: "The migration command to run. This option has a 50 character limit.", argument: "migrate" + option :serverside_version, + short: "S", + long: "serverside_version", + description: "The servside version must match our released gem.", + argument: "serverside_version" option :app, short: "a", @@ -75,6 +80,9 @@ def handle deploy_options = {verbose: switch_active?(:verbose), cli_args: ARGV} latest_deploy = nil + if options[:serverside_version] + deploy_options.merge!(serverside_version: option(:serverside_version)) + end if options[:ref] deploy_options.merge!(ref: option(:ref)) else diff --git a/lib/ey-core/models/deployment.rb b/lib/ey-core/models/deployment.rb index 2ead8c4..e73c96c 100644 --- a/lib/ey-core/models/deployment.rb +++ b/lib/ey-core/models/deployment.rb @@ -9,6 +9,7 @@ class Ey::Core::Client::Deployment < Ey::Core::Model attribute :migrate_command attribute :ref attribute :resolved_ref + attribute :serverside_version attribute :started_at, type: :time attribute :successful, type: :boolean attribute :verbose diff --git a/lib/ey-core/requests/deploy_environment_application.rb b/lib/ey-core/requests/deploy_environment_application.rb index fe2e62b..a9bb1f4 100644 --- a/lib/ey-core/requests/deploy_environment_application.rb +++ b/lib/ey-core/requests/deploy_environment_application.rb @@ -30,6 +30,7 @@ def deploy_environment_application(options={}) "migrate_command" => options["deploy"]["migrate"] ? (options["deploy"]["migrate_command"] || "rake db:migrate") : nil, "migrate" => options["deploy"]["migrate"] || false, "resolved_ref" => options["deploy"]["ref"], + "serverside_version" => options["deploy"]["serverside_version"], "started_at" => Time.now, "successful" => true } From 2aaed38b8e3052e237ed407ff174c156544069a8 Mon Sep 17 00:00:00 2001 From: Callum Pease Date: Mon, 25 Oct 2021 15:38:50 +0100 Subject: [PATCH 2/2] Updated as per review --- lib/ey-core/cli/deploy.rb | 2 +- lib/ey-core/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ey-core/cli/deploy.rb b/lib/ey-core/cli/deploy.rb index 916431c..715ce90 100644 --- a/lib/ey-core/cli/deploy.rb +++ b/lib/ey-core/cli/deploy.rb @@ -35,7 +35,7 @@ class Deploy < Subcommand option :serverside_version, short: "S", long: "serverside_version", - description: "The servside version must match our released gem.", + description: "Override the default version of engineyard-serverside. The version must match a released version. Use with care.", argument: "serverside_version" option :app, diff --git a/lib/ey-core/version.rb b/lib/ey-core/version.rb index 1bcb1f9..f0f4052 100644 --- a/lib/ey-core/version.rb +++ b/lib/ey-core/version.rb @@ -1,5 +1,5 @@ module Ey module Core - VERSION = "3.6.1" + VERSION = "3.6.2" end end