Class: Shaman::CLI
- Inherits:
-
Object
- Object
- Shaman::CLI
- Includes:
- Commander::Methods
- Defined in:
- lib/shaman/cli.rb
Defined Under Namespace
Modules: ExitCode
Instance Method Summary collapse
-
#deploy ⇒ Object
rubocop:disable Metrics/MethodLength.
-
#init ⇒ Object
rubocop:disable Metrics/MethodLength.
- #run ⇒ Object
Instance Method Details
#deploy ⇒ Object
rubocop:disable Metrics/MethodLength
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/shaman/cli.rb', line 40 def deploy # rubocop:disable Metrics/MethodLength command :deploy do |c| c.syntax = 'shaman deploy [environment]' c.description = 'Deploy a release to specified environment' c.option '-m', '--message MESSAGE', String, 'Changelog message' c.option '-f', '--file FILE', String, 'Release path' c.option '-t', '--token TOKEN', String, 'Use different user token' c.option '-c', '--config FILE', String, 'Use different config file' c.option '-g', '--git', 'Use git for message (overrides any manual settings!)' c.option '-C', '--commit COMMIT', String, 'Which commit to use instead of HEAD' c.option '-M', '--minimum_version', 'Set release as minimum version' c.option '-n', '--release_name RELEASE_NAME', String, 'Release name (ZIP platform only)' c.option '-x', '--env_token ENV_TOKEN', String, 'Environment token' c.action do |args, | Shaman::Deploy.new(args, ).deploy end end end |
#init ⇒ Object
rubocop:disable Metrics/MethodLength
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/shaman/cli.rb', line 25 def init # rubocop:disable Metrics/MethodLength command :init do |c| c.syntax = 'shaman init' c.description = 'Initialize your project. EXAMPLE: shaman init -s abamobi' c.option '-s', '--search SEARCH', String, 'Filter projects by a search term' c.option '-f', '--favorites', 'Show only favorites' c.option '-p', '--platform PLATFORM', 'Choose platform' c.option '-i', '--project_id PROJECT', 'Choose project id' c.action do |_args, | Shaman::Init.check! Shaman::Init.init() end end end |