Class: Tebako::Cli
- Inherits:
-
Thor
- Object
- Thor
- Tebako::Cli
- Defined in:
- lib/tebako/cli.rb
Overview
Tebako packager front-end
Constant Summary collapse
- CWD_DESCRIPTION =
"Current working directory for packaged application. This directory shall be specified relative to root.\n\#{\" \" * 65}# If this parameter is not set, the application will start in the current directory of the host file system.\n"- REF_DESCRIPTION =
"\"Referenced tebako run-time package; 'tebako-runtime' by default\".\n\#{\" \" * 65}# This option specifies the tebako runtime to be used by the application on Windows and if mode is 'application' only .\n"- RGP_DESCRIPTION =
"Current working directory for packaged application. This directory shall be specified relative to root.\n\#{\" \" * 65}# If this parameter is not set, the application will start in the current directory of the host file system.\n"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
142 143 144 |
# File 'lib/tebako/cli.rb', line 142 def self.exit_on_failure? true end |
Instance Method Details
#clean ⇒ Object
58 59 60 61 62 |
# File 'lib/tebako/cli.rb', line 58 def clean (om, cm) = bootstrap(clean: true) cm.clean_cache extra_win_clean([om.deps]) end |
#clean_ruby ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/tebako/cli.rb', line 68 def clean_ruby puts "Cleaning Ruby sources from tebako packaging environment" (om,) = bootstrap(clean: true) suffix = ["Ruby"].nil? ? "" : "_#{options["Ruby"]}" nmr = Dir.glob(File.join(om.deps, "src", "_ruby#{suffix}*")) nms = Dir.glob(File.join(om.deps, "stash#{suffix}*")) FileUtils.rm_rf(nmr + nms, secure: true) extra_win_clean(nmr) end |
#hash ⇒ Object
81 82 83 |
# File 'lib/tebako/cli.rb', line 81 def hash print Digest::SHA256.hexdigest [File.read(File.join(source, "CMakeLists.txt")), Tebako::VERSION].join end |
#press ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/tebako/cli.rb', line 117 def press (om, cm) = bootstrap do_press(om) cm.ensure_version_file rescue Tebako::Error => e puts "Tebako script failed: #{e.message} [#{e.error_code}]" exit e.error_code end |
#setup ⇒ Object
132 133 134 135 136 137 138 139 140 |
# File 'lib/tebako/cli.rb', line 132 def setup (om, cm) = bootstrap do_setup(om) cm.ensure_version_file rescue Tebako::Error => e puts "Tebako script failed: #{e.message} [#{e.error_code}]" exit e.error_code end |