Class: Pindo::Command::Env::Swarkenv
- Inherits:
-
Pindo::Command::Env
- Object
- Pindo::Command
- Pindo::Command::Env
- Pindo::Command::Env::Swarkenv
- Defined in:
- lib/pindo/command/env/swarkenv.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Swarkenv
constructor
A new instance of Swarkenv.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Swarkenv
Returns a new instance of Swarkenv.
39 40 41 42 |
# File 'lib/pindo/command/env/swarkenv.rb', line 39 def initialize(argv) super(argv) @additional_args = argv.remainder! end |
Class Method Details
.options ⇒ Object
33 34 35 36 37 |
# File 'lib/pindo/command/env/swarkenv.rb', line 33 def self. [ ].concat(super) end |
Instance Method Details
#run ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/pindo/command/env/swarkenv.rb', line 48 def run swark_dir = File::(pindo_single_config.pindo_dir) if !File.exist?(swark_dir) FileUtils.mkdir(swark_dir) end reponame = get_repo_base_name(repo_url:pindo_single_config.deploy_swark_giturl) swark_path = getcode_to_dir(reponame:'swark-toolchain-lite', remote_url:pindo_single_config.deploy_swark_giturl, path:swark_dir) command = File.join(swark_path, 'install') system "/bin/chmod 777 #{command}" system command swark_exe_dir = File::("~") command = File.join(swark_exe_dir, 'swark-toolchain/tools/swark-upgrade') puts command system "/bin/chmod 777 #{command}" system command end |
#validate! ⇒ Object
44 45 46 |
# File 'lib/pindo/command/env/swarkenv.rb', line 44 def validate! super end |