Class: Lamma::CLI::Deploy
- Inherits:
-
Object
- Object
- Lamma::CLI::Deploy
- Includes:
- SharedHelpers
- Defined in:
- lib/lamma/cli/deploy.rb
Constant Summary
Constants included from SharedHelpers
SharedHelpers::DEFAULT_PROFILE
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#thor ⇒ Object
readonly
Returns the value of attribute thor.
Instance Method Summary collapse
-
#initialize(options, thor) ⇒ Deploy
constructor
A new instance of Deploy.
- #run ⇒ Object
Methods included from SharedHelpers
#ini_config, #ini_credentials, #region_or_raise, #search_conf_path
Constructor Details
#initialize(options, thor) ⇒ Deploy
Returns a new instance of Deploy.
14 15 16 17 18 |
# File 'lib/lamma/cli/deploy.rb', line 14 def initialize(, thor) @options = @thor = thor @conf_path = search_conf_path(['conf_path'] || Lamma::DEFAULT_CONF_PATH) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'lib/lamma/cli/deploy.rb', line 12 def @options end |
#thor ⇒ Object (readonly)
Returns the value of attribute thor.
12 13 14 |
# File 'lib/lamma/cli/deploy.rb', line 12 def thor @thor end |
Instance Method Details
#run ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/lamma/cli/deploy.rb', line 20 def run unless File.exist?(@conf_path) abort("Config file #{@conf_path} is missing.") end f = Lamma::Function.new(@conf_path) update_or_create_function(f) new_version = f.publish_version(['message']).version if ['alias'] update_or_create_alias(f, new_version) end end |