Sha256: 1dae8750dd6ce18256697a20d5886212f75365a5f5055451ef2cb8457dea52cd
Contents?: true
Size: 1.64 KB
Versions: 3
Compression:
Stored size: 1.64 KB
Contents
require 'thor' require_relative 'ggsm/version' require_relative 'ggsm/flow/start' require_relative 'ggsm/flow/update' require_relative 'ggsm/flow/sync' require_relative 'ggsm/flow/switch' require_relative 'ggsm/flow/delete' require_relative 'ggsm/flow/foreach' require_relative 'ggsm/flow/merge' require_relative 'ggsm/flow/finish' module GGSM class Cli < Thor include Start include Update include Sync include Switch include Delete include Foreach include Merge include Finish desc 'start <branch> [<commit>] [<origin>]', 'Start to develop new feature' def start(branch, action='') start_flow(branch, action) end desc 'switch <branch>', 'Switch to branch <branch>' def switch(branch) switch_flow(branch) end desc 'update', 'Update submodule' def update update_flow end desc 'sync', 'Sync remote app and submodules' def sync sync_flow end desc 'delete <branch> [-r|--remote] [-a|--all]', 'Delete <branch>' option :remote, :default => false, :type => :boolean, aliases: '-r' option :all, :default => false, :type => :boolean, aliases: '-a' def delete(branch) remote = options[:remote] all = options[:all] delete_flow(branch, remote, all) end desc 'foreach [<commands>...]', 'Executes the git command in each module' def foreach(*commands) foreach_flow(*commands) end desc 'merge [<branch>]', 'Merge the <branch>, default <branch>: origin/dev' def merge(branch='origin/dev') merge_flow(branch) end desc 'finish', 'Finish the feature' def finish finish_flow end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ggsm-1.1.2 | lib/ggsm.rb |
ggsm-1.1.1 | lib/ggsm.rb |
ggsm-1.1.0 | lib/ggsm.rb |