Skip to content

Commit

Permalink
Merge pull request #102 from jamesiarmes/create-deploy-version
Browse files Browse the repository at this point in the history
Allow a version to be specified to deploy during create.
  • Loading branch information
glennpratt committed Jun 9, 2016
2 parents 7660fb2 + 5aee86a commit 247d37e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/moonshot/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,19 @@ def list
desc: "Parent stack to import parameters from. (Default: #{default_parent_stack || 'None'})")
option :deploy, default: true, type: :boolean, aliases: '-d',
desc: 'Choose if code should be deployed after stack is created'
option :version, default: nil, type: :string,
desc: 'Version to deploy. Only valid if deploy flag is set.'
option :show_all_events, desc: 'Show all stack events during update. (Default: errors only)'
def create
controller.create
controller.deploy_code if options[:deploy]

if options[:deploy]
if options[:version].nil?
controller.deploy_code
else
controller.deploy_version(options[:version])
end
end
end

desc :update, 'Update the CloudFormation stack within an environment.'
Expand Down

0 comments on commit 247d37e

Please sign in to comment.