Class: Slugforge::Build::Package
- Inherits:
-
Slugforge::BuildCommand
- Object
- Thor
- Command
- Slugforge::BuildCommand
- Slugforge::Build::Package
- Defined in:
- lib/slugforge/build/package.rb
Instance Method Summary collapse
Methods inherited from Slugforge::BuildCommand
Methods inherited from Command
Methods included from Helper
Constructor Details
This class inherits a constructor from Slugforge::Command
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/slugforge/build/package.rb', line 5 def call existing = Dir.glob('*.slug') if [:clean] existing.each do |path| logger.say_status :clean, path, :red File.delete(path) end end logger.say_status :execute, "fpm #{package_file_name}" execute(fpm_command) if [:deploy] invoke Slugforge::Commands::Deploy, [:file, package_file_name, [:deploy]], [] end end |