Class: Kamal::Cli::App::PrepareAssets
- Inherits:
-
Object
- Object
- Kamal::Cli::App::PrepareAssets
- Defined in:
- lib/kamal/cli/app/prepare_assets.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#sshkit ⇒ Object
readonly
Returns the value of attribute sshkit.
Instance Method Summary collapse
-
#initialize(host, role, sshkit) ⇒ PrepareAssets
constructor
A new instance of PrepareAssets.
- #run ⇒ Object
Constructor Details
#initialize(host, role, sshkit) ⇒ PrepareAssets
Returns a new instance of PrepareAssets.
6 7 8 9 10 |
# File 'lib/kamal/cli/app/prepare_assets.rb', line 6 def initialize(host, role, sshkit) @host = host @role = role @sshkit = sshkit end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
2 3 4 |
# File 'lib/kamal/cli/app/prepare_assets.rb', line 2 def host @host end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
2 3 4 |
# File 'lib/kamal/cli/app/prepare_assets.rb', line 2 def role @role end |
#sshkit ⇒ Object (readonly)
Returns the value of attribute sshkit.
2 3 4 |
# File 'lib/kamal/cli/app/prepare_assets.rb', line 2 def sshkit @sshkit end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/kamal/cli/app/prepare_assets.rb', line 12 def run if assets? execute *app.extract_assets old_version = capture_with_info(*app.current_running_version, raise_on_non_zero_exit: false).strip execute *app.sync_asset_volumes(old_version: old_version) end end |