big_keeper 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +79 -20
- data/bin/{big-keeper → bigkeeper} +0 -0
- data/docs/en-US/README.md +50 -0
- data/docs/zh-CN/BIGKEEPER_FILE.md +2 -2
- data/docs/zh-CN/FEATURE&HOTFIX.md +121 -0
- data/docs/zh-CN/PODFILE.md +43 -0
- data/docs/zh-CN/README.md +33 -15
- data/docs/zh-CN/RECOMMEND.md +22 -0
- data/docs/zh-CN/RELEASE.md +8 -5
- data/lib/big_keeper/command/feature&hotfix/delete.rb +33 -0
- data/lib/big_keeper/command/feature&hotfix/{feature_finish.rb → finish.rb} +13 -12
- data/lib/big_keeper/command/feature&hotfix/{feature_pull.rb → pull.rb} +4 -4
- data/lib/big_keeper/command/feature&hotfix/{feature_push.rb → push.rb} +4 -8
- data/lib/big_keeper/command/feature&hotfix/{feature_start.rb → start.rb} +7 -7
- data/lib/big_keeper/command/feature&hotfix/{feature_switch.rb → switch.rb} +6 -6
- data/lib/big_keeper/command/feature&hotfix/{feature_update.rb → update.rb} +7 -7
- data/lib/big_keeper/command/release/{release_home.rb → home.rb} +4 -4
- data/lib/big_keeper/command/release/module.rb +106 -0
- data/lib/big_keeper/model/gitflow_type.rb +13 -1
- data/lib/big_keeper/service/git_service.rb +84 -40
- data/lib/big_keeper/service/module_service.rb +52 -62
- data/lib/big_keeper/util/bigkeeper_parser.rb +19 -3
- data/lib/big_keeper/util/git_operator.rb +19 -12
- data/lib/big_keeper/version.rb +1 -1
- data/lib/big_keeper.rb +131 -25
- data/resources/banner.png +0 -0
- data/resources/keynote/big-keeper-readme-example.key +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.001.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.002.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.003.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.004.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.005.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.006.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.007.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.008.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.009.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.010.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.011.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.012.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.013.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.014.jpeg +0 -0
- data/resources/keynote/big-keeper-readme-feature.key +0 -0
- data/resources/keynote/big-keeper-readme-release.key +0 -0
- data/resources/readme/big-keeper-readme.008.png +0 -0
- data/resources/readme/big-keeper-readme.009.png +0 -0
- data/resources/readme/big-keeper-readme.010.png +0 -0
- data/resources/readme/big-keeper-readme.011.png +0 -0
- data/resources/readme/big-keeper-readme.012.png +0 -0
- metadata +40 -17
- data/docs/zh-CN/FEATURE.md +0 -88
- data/lib/big_keeper/command/release/release_module.rb +0 -86
- data/lib/big_keeper/command/release/release_module.sh +0 -44
- data/resources/readme/big-keeper-readme.008.jpeg +0 -0
- data/resources/readme/big-keeper-readme.009.jpeg +0 -0
- data/resources/readme/big-keeper-readme.010.jpeg +0 -0
| @@ -1,3 +1,5 @@ | |
| 1 | 
            +
            require 'big_keeper/util/logger'
         | 
| 2 | 
            +
             | 
| 1 3 | 
             
            # Bigkeeper module
         | 
| 2 4 | 
             
            module BigKeeper
         | 
| 3 5 | 
             
              def self.version(name)
         | 
| @@ -33,6 +35,9 @@ module BigKeeper | |
| 33 35 |  | 
| 34 36 | 
             
                def self.parse(bigkeeper)
         | 
| 35 37 | 
             
                  if @@config.empty?
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                    Logger.error("Can't find a Bigkeeper file in current directory.") if !BigkeeperParser.definitely_exists?(bigkeeper)
         | 
| 40 | 
            +
             | 
| 36 41 | 
             
                    content = File.read bigkeeper
         | 
| 37 42 | 
             
                    content.gsub!(/version\s/, 'BigKeeper::version ')
         | 
| 38 43 | 
             
                    content.gsub!(/user\s/, 'BigKeeper::user ')
         | 
| @@ -45,6 +50,13 @@ module BigKeeper | |
| 45 50 | 
             
                  end
         | 
| 46 51 | 
             
                end
         | 
| 47 52 |  | 
| 53 | 
            +
                def self.definitely_exists? path
         | 
| 54 | 
            +
                  folder = File.dirname path
         | 
| 55 | 
            +
                  filename = File.basename path
         | 
| 56 | 
            +
                  # Unlike Ruby IO, ls, and find -f, this technique will fail to locate the file if the case is wrong:
         | 
| 57 | 
            +
                  not %x( find "#{folder}" -name "#{filename}" ).empty?
         | 
| 58 | 
            +
                end
         | 
| 59 | 
            +
             | 
| 48 60 | 
             
                def self.parse_version(name)
         | 
| 49 61 | 
             
                  @@config[:version] = name
         | 
| 50 62 | 
             
                end
         | 
| @@ -75,7 +87,7 @@ module BigKeeper | |
| 75 87 | 
             
                  elsif params[:git]
         | 
| 76 88 | 
             
                    parse_modules_pod(name, params)
         | 
| 77 89 | 
             
                  else
         | 
| 78 | 
            -
                     | 
| 90 | 
            +
                    Logger.error(%(There should be ':path =>' or ':git =>' for pod #{name}))
         | 
| 79 91 | 
             
                  end
         | 
| 80 92 | 
             
                end
         | 
| 81 93 |  | 
| @@ -118,7 +130,11 @@ module BigKeeper | |
| 118 130 | 
             
                end
         | 
| 119 131 |  | 
| 120 132 | 
             
                def self.sourcemodule_path
         | 
| 121 | 
            -
                  @@config[:source] | 
| 133 | 
            +
                  if @@config[:source] == nil
         | 
| 134 | 
            +
                    return ""
         | 
| 135 | 
            +
                  else
         | 
| 136 | 
            +
                    @@config[:source].join(",").reverse.chop.reverse
         | 
| 137 | 
            +
                  end
         | 
| 122 138 | 
             
                end
         | 
| 123 139 |  | 
| 124 140 | 
             
                def self.module_full_path(home_path, user_name, module_name)
         | 
| @@ -155,7 +171,7 @@ module BigKeeper | |
| 155 171 |  | 
| 156 172 | 
             
                def self.verify_modules(modules)
         | 
| 157 173 | 
             
                  modules.each do |item|
         | 
| 158 | 
            -
                     | 
| 174 | 
            +
                    Logger.error("Can not find module #{item} in Bigkeeper file") unless @@config[:modules][item]
         | 
| 159 175 | 
             
                  end
         | 
| 160 176 | 
             
                end
         | 
| 161 177 |  | 
| @@ -1,3 +1,5 @@ | |
| 1 | 
            +
            require 'big_keeper/util/logger'
         | 
| 2 | 
            +
             | 
| 1 3 | 
             
            module BigKeeper
         | 
| 2 4 | 
             
              # Operator for got
         | 
| 3 5 | 
             
              class GitOperator
         | 
| @@ -37,23 +39,23 @@ module BigKeeper | |
| 37 39 | 
             
                  has_branch
         | 
| 38 40 | 
             
                end
         | 
| 39 41 |  | 
| 40 | 
            -
                def  | 
| 42 | 
            +
                def checkout(path, branch_name)
         | 
| 41 43 | 
             
                  Dir.chdir(path) do
         | 
| 42 44 | 
             
                    IO.popen("git checkout #{branch_name}") do |io|
         | 
| 43 45 | 
             
                      io.each do |line|
         | 
| 44 | 
            -
                         | 
| 46 | 
            +
                        Logger.error("Checkout #{branch_name} failed.") if line.include? 'error'
         | 
| 45 47 | 
             
                      end
         | 
| 46 48 | 
             
                    end
         | 
| 47 49 | 
             
                  end
         | 
| 48 50 | 
             
                end
         | 
| 49 51 |  | 
| 50 | 
            -
                def  | 
| 52 | 
            +
                def fetch(path)
         | 
| 51 53 | 
             
                  Dir.chdir(path) do
         | 
| 52 54 | 
             
                    `git fetch origin`
         | 
| 53 55 | 
             
                  end
         | 
| 54 56 | 
             
                end
         | 
| 55 57 |  | 
| 56 | 
            -
                def  | 
| 58 | 
            +
                def rebase(path, branch_name)
         | 
| 57 59 | 
             
                  Dir.chdir(path) do
         | 
| 58 60 | 
             
                    `git rebase origin/#{branch_name}`
         | 
| 59 61 | 
             
                  end
         | 
| @@ -72,18 +74,12 @@ module BigKeeper | |
| 72 74 | 
             
                  end
         | 
| 73 75 | 
             
                end
         | 
| 74 76 |  | 
| 75 | 
            -
                def  | 
| 77 | 
            +
                def push_to_remote(path, branch_name)
         | 
| 76 78 | 
             
                  Dir.chdir(path) do
         | 
| 77 79 | 
             
                    `git push -u origin #{branch_name}`
         | 
| 78 80 | 
             
                  end
         | 
| 79 81 | 
             
                end
         | 
| 80 82 |  | 
| 81 | 
            -
                def push(path)
         | 
| 82 | 
            -
                  Dir.chdir(path) do
         | 
| 83 | 
            -
                    p `git push`
         | 
| 84 | 
            -
                  end
         | 
| 85 | 
            -
                end
         | 
| 86 | 
            -
             | 
| 87 83 | 
             
                def pull(path)
         | 
| 88 84 | 
             
                  Dir.chdir(path) do
         | 
| 89 85 | 
             
                    p `git pull`
         | 
| @@ -111,9 +107,20 @@ module BigKeeper | |
| 111 107 | 
             
                  has_changes
         | 
| 112 108 | 
             
                end
         | 
| 113 109 |  | 
| 114 | 
            -
                def  | 
| 110 | 
            +
                def dicard(path)
         | 
| 111 | 
            +
                  Dir.chdir(path) do
         | 
| 112 | 
            +
                    `git checkout . && git clean -xdf`
         | 
| 113 | 
            +
                  end
         | 
| 114 | 
            +
                end
         | 
| 115 | 
            +
             | 
| 116 | 
            +
                def del_local(path, branch_name)
         | 
| 115 117 | 
             
                  Dir.chdir(path) do
         | 
| 116 118 | 
             
                    p `git branch -D #{branch_name}`
         | 
| 119 | 
            +
                  end
         | 
| 120 | 
            +
                end
         | 
| 121 | 
            +
             | 
| 122 | 
            +
                def del_remote(path, branch_name)
         | 
| 123 | 
            +
                  Dir.chdir(path) do
         | 
| 117 124 | 
             
                    p `git push origin --delete #{branch_name}`
         | 
| 118 125 | 
             
                  end
         | 
| 119 126 | 
             
                end
         | 
    
        data/lib/big_keeper/version.rb
    CHANGED
    
    
    
        data/lib/big_keeper.rb
    CHANGED
    
    | @@ -7,14 +7,15 @@ require 'big_keeper/util/git_operator' | |
| 7 7 |  | 
| 8 8 | 
             
            require 'big_keeper/model/gitflow_type'
         | 
| 9 9 |  | 
| 10 | 
            -
            require 'big_keeper/command/feature&hotfix/ | 
| 11 | 
            -
            require 'big_keeper/command/feature&hotfix/ | 
| 12 | 
            -
            require 'big_keeper/command/feature&hotfix/ | 
| 13 | 
            -
            require 'big_keeper/command/feature&hotfix/ | 
| 14 | 
            -
            require 'big_keeper/command/feature&hotfix/ | 
| 15 | 
            -
            require 'big_keeper/command/feature&hotfix/ | 
| 16 | 
            -
            require 'big_keeper/command/ | 
| 17 | 
            -
            require 'big_keeper/command/release/ | 
| 10 | 
            +
            require 'big_keeper/command/feature&hotfix/start'
         | 
| 11 | 
            +
            require 'big_keeper/command/feature&hotfix/finish'
         | 
| 12 | 
            +
            require 'big_keeper/command/feature&hotfix/switch'
         | 
| 13 | 
            +
            require 'big_keeper/command/feature&hotfix/update'
         | 
| 14 | 
            +
            require 'big_keeper/command/feature&hotfix/pull'
         | 
| 15 | 
            +
            require 'big_keeper/command/feature&hotfix/push'
         | 
| 16 | 
            +
            require 'big_keeper/command/feature&hotfix/delete'
         | 
| 17 | 
            +
            require 'big_keeper/command/release/home'
         | 
| 18 | 
            +
            require 'big_keeper/command/release/module'
         | 
| 18 19 | 
             
            require 'big_keeper/command/pod/podfile_lock'
         | 
| 19 20 |  | 
| 20 21 | 
             
            require 'big_keeper/service/git_service'
         | 
| @@ -25,7 +26,7 @@ include GLI::App | |
| 25 26 |  | 
| 26 27 | 
             
            module BigKeeper
         | 
| 27 28 | 
             
              # Your code goes here...
         | 
| 28 | 
            -
              program_desc 'Efficiency improvement for iOS modular development, iOSer using this tool can make modular development easier.'
         | 
| 29 | 
            +
              program_desc 'Efficiency improvement for iOS&Android modular development, iOSer&Android using this tool can make modular development easier.'
         | 
| 29 30 |  | 
| 30 31 | 
             
              flag %i[p path], default_value: './'
         | 
| 31 32 | 
             
              flag %i[v ver], default_value: 'Version in Bigkeeper file'
         | 
| @@ -46,7 +47,7 @@ module BigKeeper | |
| 46 47 | 
             
                exit
         | 
| 47 48 | 
             
              end
         | 
| 48 49 |  | 
| 49 | 
            -
              desc ' | 
| 50 | 
            +
              desc 'Gitflow feature operations'
         | 
| 50 51 | 
             
              command :feature do |c|
         | 
| 51 52 |  | 
| 52 53 | 
             
                c.desc 'Start a new feature with name for given modules and main project'
         | 
| @@ -56,16 +57,16 @@ module BigKeeper | |
| 56 57 | 
             
                    help_now!('feature name is required') if args.length < 1
         | 
| 57 58 | 
             
                    name = args[0]
         | 
| 58 59 | 
             
                    modules = args[(1...args.length)] if args.length > 1
         | 
| 59 | 
            -
                     | 
| 60 | 
            +
                    start(path, version, user, name, modules, GitflowType::FEATURE)
         | 
| 60 61 | 
             
                  end
         | 
| 61 62 | 
             
                end
         | 
| 62 63 |  | 
| 63 | 
            -
                c.desc 'Update  | 
| 64 | 
            +
                c.desc 'Update modules for the feature with name'
         | 
| 64 65 | 
             
                c.command :update do |update|
         | 
| 65 66 | 
             
                  update.action do |global_options, options, args|
         | 
| 66 67 | 
             
                    help_now!('user name is required') if user and user.empty?
         | 
| 67 68 | 
             
                    modules = args[(0...args.length)] if args.length > 0
         | 
| 68 | 
            -
                     | 
| 69 | 
            +
                    update(path, user, modules, GitflowType::FEATURE)
         | 
| 69 70 | 
             
                  end
         | 
| 70 71 | 
             
                end
         | 
| 71 72 |  | 
| @@ -75,7 +76,7 @@ module BigKeeper | |
| 75 76 | 
             
                    help_now!('user name is required') if user and user.empty?
         | 
| 76 77 | 
             
                    help_now!('feature name is required') if args.length < 1
         | 
| 77 78 | 
             
                    name = args[0]
         | 
| 78 | 
            -
                     | 
| 79 | 
            +
                    switch_to(path, version, user, name, GitflowType::FEATURE)
         | 
| 79 80 | 
             
                  end
         | 
| 80 81 | 
             
                end
         | 
| 81 82 |  | 
| @@ -83,7 +84,7 @@ module BigKeeper | |
| 83 84 | 
             
                c.command :pull do |pull|
         | 
| 84 85 | 
             
                  pull.action do |global_options, options, args|
         | 
| 85 86 | 
             
                    help_now!('user name is required') if user and user.empty?
         | 
| 86 | 
            -
                     | 
| 87 | 
            +
                    pull(path, user, GitflowType::FEATURE)
         | 
| 87 88 | 
             
                  end
         | 
| 88 89 | 
             
                end
         | 
| 89 90 |  | 
| @@ -94,7 +95,7 @@ module BigKeeper | |
| 94 95 | 
             
                    help_now!('comment message is required') if args.length < 1
         | 
| 95 96 | 
             
                    help_now!(%Q(comment message should be wrappered with '' or "")) if args.length > 1
         | 
| 96 97 | 
             
                    comment = args[0]
         | 
| 97 | 
            -
                     | 
| 98 | 
            +
                    push(path, user, comment, GitflowType::FEATURE)
         | 
| 98 99 | 
             
                  end
         | 
| 99 100 | 
             
                end
         | 
| 100 101 |  | 
| @@ -102,7 +103,17 @@ module BigKeeper | |
| 102 103 | 
             
                c.command :finish do |finish|
         | 
| 103 104 | 
             
                  finish.action do |global_options, options, args|
         | 
| 104 105 | 
             
                    help_now!('user name is required') if user and user.empty?
         | 
| 105 | 
            -
                     | 
| 106 | 
            +
                    finish(path, user, GitflowType::FEATURE)
         | 
| 107 | 
            +
                  end
         | 
| 108 | 
            +
                end
         | 
| 109 | 
            +
             | 
| 110 | 
            +
                c.desc 'Delete feature with name'
         | 
| 111 | 
            +
                c.command :delete do |delete|
         | 
| 112 | 
            +
                  delete.action do |global_options, options, args|
         | 
| 113 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 114 | 
            +
                    help_now!('feature name is required') if args.length < 1
         | 
| 115 | 
            +
                    name = args[0]
         | 
| 116 | 
            +
                    delete(path, user, name, GitflowType::FEATURE)
         | 
| 106 117 | 
             
                  end
         | 
| 107 118 | 
             
                end
         | 
| 108 119 |  | 
| @@ -117,7 +128,88 @@ module BigKeeper | |
| 117 128 | 
             
                end
         | 
| 118 129 | 
             
              end
         | 
| 119 130 |  | 
| 120 | 
            -
              desc ' | 
| 131 | 
            +
              desc 'Gitflow hotfix operations'
         | 
| 132 | 
            +
              command :hotfix do |c|
         | 
| 133 | 
            +
             | 
| 134 | 
            +
                c.desc 'Start a new hotfix with name for given modules and main project'
         | 
| 135 | 
            +
                c.command :start do |start|
         | 
| 136 | 
            +
                  start.action do |global_options, options, args|
         | 
| 137 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 138 | 
            +
                    help_now!('hotfix name is required') if args.length < 1
         | 
| 139 | 
            +
                    name = args[0]
         | 
| 140 | 
            +
                    modules = args[(1...args.length)] if args.length > 1
         | 
| 141 | 
            +
                    start(path, version, user, name, modules, GitflowType::HOTFIX)
         | 
| 142 | 
            +
                  end
         | 
| 143 | 
            +
                end
         | 
| 144 | 
            +
             | 
| 145 | 
            +
                c.desc 'Update modules for the hotfix with name'
         | 
| 146 | 
            +
                c.command :update do |update|
         | 
| 147 | 
            +
                  update.action do |global_options, options, args|
         | 
| 148 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 149 | 
            +
                    modules = args[(0...args.length)] if args.length > 0
         | 
| 150 | 
            +
                    update(path, user, modules, GitflowType::HOTFIX)
         | 
| 151 | 
            +
                  end
         | 
| 152 | 
            +
                end
         | 
| 153 | 
            +
             | 
| 154 | 
            +
                c.desc 'Switch to the hotfix with name'
         | 
| 155 | 
            +
                c.command :switch do |switch|
         | 
| 156 | 
            +
                  switch.action do |global_options, options, args|
         | 
| 157 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 158 | 
            +
                    help_now!('hotfix name is required') if args.length < 1
         | 
| 159 | 
            +
                    name = args[0]
         | 
| 160 | 
            +
                    switch_to(path, version, user, name, GitflowType::HOTFIX)
         | 
| 161 | 
            +
                  end
         | 
| 162 | 
            +
                end
         | 
| 163 | 
            +
             | 
| 164 | 
            +
                c.desc 'Pull remote changes for current hotfix'
         | 
| 165 | 
            +
                c.command :pull do |pull|
         | 
| 166 | 
            +
                  pull.action do |global_options, options, args|
         | 
| 167 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 168 | 
            +
                    pull(path, user, GitflowType::HOTFIX)
         | 
| 169 | 
            +
                  end
         | 
| 170 | 
            +
                end
         | 
| 171 | 
            +
             | 
| 172 | 
            +
                c.desc 'Push local changes to remote for current hotfix'
         | 
| 173 | 
            +
                c.command :push do |push|
         | 
| 174 | 
            +
                  push.action do |global_options, options, args|
         | 
| 175 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 176 | 
            +
                    help_now!('comment message is required') if args.length < 1
         | 
| 177 | 
            +
                    help_now!(%Q(comment message should be wrappered with '' or "")) if args.length > 1
         | 
| 178 | 
            +
                    comment = args[0]
         | 
| 179 | 
            +
                    push(path, user, comment, GitflowType::HOTFIX)
         | 
| 180 | 
            +
                  end
         | 
| 181 | 
            +
                end
         | 
| 182 | 
            +
             | 
| 183 | 
            +
                c.desc 'Finish current hotfix'
         | 
| 184 | 
            +
                c.command :finish do |finish|
         | 
| 185 | 
            +
                  finish.action do |global_options, options, args|
         | 
| 186 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 187 | 
            +
                    finish(path, user, GitflowType::HOTFIX)
         | 
| 188 | 
            +
                  end
         | 
| 189 | 
            +
                end
         | 
| 190 | 
            +
             | 
| 191 | 
            +
                c.desc 'Delete hotfix with name'
         | 
| 192 | 
            +
                c.command :delete do |delete|
         | 
| 193 | 
            +
                  delete.action do |global_options, options, args|
         | 
| 194 | 
            +
                    help_now!('user name is required') if user and user.empty?
         | 
| 195 | 
            +
                    help_now!('feature name is required') if args.length < 1
         | 
| 196 | 
            +
                    name = args[0]
         | 
| 197 | 
            +
                    delete(path, user, name, GitflowType::HOTFIX)
         | 
| 198 | 
            +
                  end
         | 
| 199 | 
            +
                end
         | 
| 200 | 
            +
             | 
| 201 | 
            +
                c.desc 'List all the hotfixes'
         | 
| 202 | 
            +
                c.command :list do |list|
         | 
| 203 | 
            +
                  list.action do
         | 
| 204 | 
            +
                    branchs = GitService.new.branchs_with_type(File.expand_path(path), GitflowType::HOTFIX)
         | 
| 205 | 
            +
                    branchs.each do |branch|
         | 
| 206 | 
            +
                      p branch
         | 
| 207 | 
            +
                    end
         | 
| 208 | 
            +
                  end
         | 
| 209 | 
            +
                end
         | 
| 210 | 
            +
              end
         | 
| 211 | 
            +
             | 
| 212 | 
            +
              desc 'Gitflow release operations'
         | 
| 121 213 | 
             
              command :release do |c|
         | 
| 122 214 |  | 
| 123 215 | 
             
                c.desc 'Release home project operations'
         | 
| @@ -141,14 +233,28 @@ module BigKeeper | |
| 141 233 | 
             
                end
         | 
| 142 234 |  | 
| 143 235 | 
             
                c.desc 'release module'
         | 
| 144 | 
            -
                c.command :module do | | 
| 145 | 
            -
                   | 
| 146 | 
            -
             | 
| 147 | 
            -
                     | 
| 148 | 
            -
             | 
| 149 | 
            -
             | 
| 236 | 
            +
                c.command :module do |m|
         | 
| 237 | 
            +
                  m.desc 'Start release module project'
         | 
| 238 | 
            +
                  m.command :start do |start|
         | 
| 239 | 
            +
                    start.action do |global_options, options, args|
         | 
| 240 | 
            +
                      help_now!('module name is required') if args.length != 1
         | 
| 241 | 
            +
                      raise Logger.error("release version is required") if version == nil
         | 
| 242 | 
            +
                      module_name = args[0]
         | 
| 243 | 
            +
                      release_module_start(path, version, user, module_name)
         | 
| 244 | 
            +
                    end
         | 
| 245 | 
            +
                  end
         | 
| 246 | 
            +
             | 
| 247 | 
            +
                  m.desc 'finish release module project'
         | 
| 248 | 
            +
                  m.command :finish do |finish|
         | 
| 249 | 
            +
                    finish.action do |global_options, options, args|
         | 
| 250 | 
            +
                      help_now!('module name is required') if args.length != 1
         | 
| 251 | 
            +
                      raise Logger.error("release version is required") if version == nil
         | 
| 252 | 
            +
                      module_name = args[0]
         | 
| 253 | 
            +
                      release_module_finish(path, version, user, module_name)
         | 
| 254 | 
            +
                    end
         | 
| 150 255 | 
             
                  end
         | 
| 151 256 | 
             
                end
         | 
| 257 | 
            +
             | 
| 152 258 | 
             
              end
         | 
| 153 259 |  | 
| 154 260 | 
             
              desc 'Podfile operation'
         | 
| @@ -172,7 +278,7 @@ module BigKeeper | |
| 172 278 | 
             
                end
         | 
| 173 279 | 
             
              end
         | 
| 174 280 |  | 
| 175 | 
            -
              desc ' | 
| 281 | 
            +
              desc 'Show version of bigkeeper'
         | 
| 176 282 | 
             
              command :version do |version|
         | 
| 177 283 | 
             
                version.action do |global_options, options, args|
         | 
| 178 284 | 
             
                  p "big-keeper (#{VERSION})"
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: big_keeper
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.7. | 
| 4 | 
            +
              version: 0.7.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - mmoaay
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2018-01-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: gli
         | 
| @@ -197,7 +197,7 @@ description: Efficiency improvement for iOS modular development, iOSer using thi | |
| 197 197 | 
             
            email:
         | 
| 198 198 | 
             
            - mmoaay@sina.com
         | 
| 199 199 | 
             
            executables:
         | 
| 200 | 
            -
            -  | 
| 200 | 
            +
            - bigkeeper
         | 
| 201 201 | 
             
            - setup
         | 
| 202 202 | 
             
            extensions: []
         | 
| 203 203 | 
             
            extra_rdoc_files: []
         | 
| @@ -213,24 +213,27 @@ files: | |
| 213 213 | 
             
            - README.md
         | 
| 214 214 | 
             
            - Rakefile
         | 
| 215 215 | 
             
            - big_keeper.gemspec
         | 
| 216 | 
            -
            - bin/ | 
| 216 | 
            +
            - bin/bigkeeper
         | 
| 217 217 | 
             
            - bin/setup
         | 
| 218 218 | 
             
            - docs/en-US/FEATURE.md
         | 
| 219 | 
            +
            - docs/en-US/README.md
         | 
| 219 220 | 
             
            - docs/zh-CN/BIGKEEPER_FILE.md
         | 
| 220 | 
            -
            - docs/zh-CN/FEATURE.md
         | 
| 221 | 
            +
            - docs/zh-CN/FEATURE&HOTFIX.md
         | 
| 222 | 
            +
            - docs/zh-CN/PODFILE.md
         | 
| 221 223 | 
             
            - docs/zh-CN/README.md
         | 
| 224 | 
            +
            - docs/zh-CN/RECOMMEND.md
         | 
| 222 225 | 
             
            - docs/zh-CN/RELEASE.md
         | 
| 223 226 | 
             
            - lib/big_keeper.rb
         | 
| 224 | 
            -
            - lib/big_keeper/command/feature&hotfix/ | 
| 225 | 
            -
            - lib/big_keeper/command/feature&hotfix/ | 
| 226 | 
            -
            - lib/big_keeper/command/feature&hotfix/ | 
| 227 | 
            -
            - lib/big_keeper/command/feature&hotfix/ | 
| 228 | 
            -
            - lib/big_keeper/command/feature&hotfix/ | 
| 229 | 
            -
            - lib/big_keeper/command/feature&hotfix/ | 
| 227 | 
            +
            - lib/big_keeper/command/feature&hotfix/delete.rb
         | 
| 228 | 
            +
            - lib/big_keeper/command/feature&hotfix/finish.rb
         | 
| 229 | 
            +
            - lib/big_keeper/command/feature&hotfix/pull.rb
         | 
| 230 | 
            +
            - lib/big_keeper/command/feature&hotfix/push.rb
         | 
| 231 | 
            +
            - lib/big_keeper/command/feature&hotfix/start.rb
         | 
| 232 | 
            +
            - lib/big_keeper/command/feature&hotfix/switch.rb
         | 
| 233 | 
            +
            - lib/big_keeper/command/feature&hotfix/update.rb
         | 
| 230 234 | 
             
            - lib/big_keeper/command/pod/podfile_lock.rb
         | 
| 231 | 
            -
            - lib/big_keeper/command/release/ | 
| 232 | 
            -
            - lib/big_keeper/command/release/ | 
| 233 | 
            -
            - lib/big_keeper/command/release/release_module.sh
         | 
| 235 | 
            +
            - lib/big_keeper/command/release/home.rb
         | 
| 236 | 
            +
            - lib/big_keeper/command/release/module.rb
         | 
| 234 237 | 
             
            - lib/big_keeper/model/gitflow_type.rb
         | 
| 235 238 | 
             
            - lib/big_keeper/model/operate_type.rb
         | 
| 236 239 | 
             
            - lib/big_keeper/model/podfile_model.rb
         | 
| @@ -247,6 +250,24 @@ files: | |
| 247 250 | 
             
            - lib/big_keeper/util/podfile_detector.rb
         | 
| 248 251 | 
             
            - lib/big_keeper/util/podfile_operator.rb
         | 
| 249 252 | 
             
            - lib/big_keeper/version.rb
         | 
| 253 | 
            +
            - resources/banner.png
         | 
| 254 | 
            +
            - resources/keynote/big-keeper-readme-example.key
         | 
| 255 | 
            +
            - resources/keynote/big-keeper-readme-feature.key
         | 
| 256 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.001.jpeg
         | 
| 257 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.002.jpeg
         | 
| 258 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.003.jpeg
         | 
| 259 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.004.jpeg
         | 
| 260 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.005.jpeg
         | 
| 261 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.006.jpeg
         | 
| 262 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.007.jpeg
         | 
| 263 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.008.jpeg
         | 
| 264 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.009.jpeg
         | 
| 265 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.010.jpeg
         | 
| 266 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.011.jpeg
         | 
| 267 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.012.jpeg
         | 
| 268 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.013.jpeg
         | 
| 269 | 
            +
            - resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.014.jpeg
         | 
| 270 | 
            +
            - resources/keynote/big-keeper-readme-release.key
         | 
| 250 271 | 
             
            - resources/readme/big-keeper-readme.001.png
         | 
| 251 272 | 
             
            - resources/readme/big-keeper-readme.002.png
         | 
| 252 273 | 
             
            - resources/readme/big-keeper-readme.003.png
         | 
| @@ -254,9 +275,11 @@ files: | |
| 254 275 | 
             
            - resources/readme/big-keeper-readme.005.png
         | 
| 255 276 | 
             
            - resources/readme/big-keeper-readme.006.png
         | 
| 256 277 | 
             
            - resources/readme/big-keeper-readme.007.png
         | 
| 257 | 
            -
            - resources/readme/big-keeper-readme.008. | 
| 258 | 
            -
            - resources/readme/big-keeper-readme.009. | 
| 259 | 
            -
            - resources/readme/big-keeper-readme.010. | 
| 278 | 
            +
            - resources/readme/big-keeper-readme.008.png
         | 
| 279 | 
            +
            - resources/readme/big-keeper-readme.009.png
         | 
| 280 | 
            +
            - resources/readme/big-keeper-readme.010.png
         | 
| 281 | 
            +
            - resources/readme/big-keeper-readme.011.png
         | 
| 282 | 
            +
            - resources/readme/big-keeper-readme.012.png
         | 
| 260 283 | 
             
            homepage: https://github.com/BigKeeper/big-keeper
         | 
| 261 284 | 
             
            licenses:
         | 
| 262 285 | 
             
            - MIT
         | 
    
        data/docs/zh-CN/FEATURE.md
    DELETED
    
    | @@ -1,88 +0,0 @@ | |
| 1 | 
            -
            # feature - 功能开发流程
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            直接在命令行执行 `big-keeper feature --help` 可以查看其提供的所有功能:
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            ```
         | 
| 6 | 
            -
            NAME
         | 
| 7 | 
            -
                feature - Feature operations
         | 
| 8 | 
            -
             | 
| 9 | 
            -
            SYNOPSIS
         | 
| 10 | 
            -
                big-keeper [global options] feature [command options] finish
         | 
| 11 | 
            -
                big-keeper [global options] feature [command options] list
         | 
| 12 | 
            -
                big-keeper [global options] feature [command options] pull
         | 
| 13 | 
            -
                big-keeper [global options] feature [command options] push
         | 
| 14 | 
            -
                big-keeper [global options] feature [command options] start
         | 
| 15 | 
            -
                big-keeper [global options] feature [command options] switch
         | 
| 16 | 
            -
                big-keeper [global options] feature [command options] update
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            COMMAND OPTIONS
         | 
| 19 | 
            -
                -u, --user=arg - (default: mmoaay)
         | 
| 20 | 
            -
             | 
| 21 | 
            -
            COMMANDS
         | 
| 22 | 
            -
                finish - Finish current feature
         | 
| 23 | 
            -
                list   - List all the features
         | 
| 24 | 
            -
                pull   - Pull remote changes for current feature
         | 
| 25 | 
            -
                push   - Push local changes to remote for current feature
         | 
| 26 | 
            -
                start  - Start a new feature with name for given modules and main project
         | 
| 27 | 
            -
                switch - Switch to the feature with name
         | 
| 28 | 
            -
                update - Update moduels for the feature with name
         | 
| 29 | 
            -
            ```
         | 
| 30 | 
            -
             | 
| 31 | 
            -
            全局参数如下:
         | 
| 32 | 
            -
             | 
| 33 | 
            -
            - -u, --user:用户名,默认是 git global config 的 user.name,会显示在命令提示信息中,比如上述提示信息中的默认用户名是 mmoaay
         | 
| 34 | 
            -
             | 
| 35 | 
            -
            功能列表如下:
         | 
| 36 | 
            -
             | 
| 37 | 
            -
            - start:
         | 
| 38 | 
            -
              开始一个新的 feature,输入参数依次为:
         | 
| 39 | 
            -
              - feature 的名字;
         | 
| 40 | 
            -
              - 开发该 feature 需要改动的业务模块名。可以多个,用空格隔开;如果不指定,取 **Bigkeeper 文件中所有的业务模块名**。
         | 
| 41 | 
            -
            - finish:结束当前 feature;
         | 
| 42 | 
            -
            - switch:切换到一个已经存在的 feature,输入参数为 feature 名;
         | 
| 43 | 
            -
            - update:
         | 
| 44 | 
            -
              更新一个 feature 需要改动的业务模块,输入参数依次为:
         | 
| 45 | 
            -
              - feature 的名字;
         | 
| 46 | 
            -
              - 开发该 feature 需要改动的业务模块名。可以多个,用空格隔开;如果不指定,取 **Bigkeeper 文件中所有的业务模块名**。
         | 
| 47 | 
            -
            - pull:拉取当前 feature 主项目和业务模块的远程 git 仓库更新;
         | 
| 48 | 
            -
            - push:提交并推送当前 feature 主项目和业务模块的本地变更到远程 git 仓库,输入参数为提交信息;
         | 
| 49 | 
            -
            - list:显示当前的 feature 列表。
         | 
| 50 | 
            -
             | 
| 51 | 
            -
            ## feature 的工作区
         | 
| 52 | 
            -
             | 
| 53 | 
            -
            
         | 
| 54 | 
            -
             | 
| 55 | 
            -
            feature 的工作区主要由两部分组成:
         | 
| 56 | 
            -
             | 
| 57 | 
            -
            - 主项目;
         | 
| 58 | 
            -
            - 相关业务模块,我们把 Podfile 中引用方式为 `:path => {业务模块本地路径}` 的模块做为相关业务模块。
         | 
| 59 | 
            -
             | 
| 60 | 
            -
            主项目和每个相关业务模块又有各自的工作区,由三个部分组成:
         | 
| 61 | 
            -
             | 
| 62 | 
            -
            - 当前代码区改动;
         | 
| 63 | 
            -
            - stash 缓存区,当用户需要切换新的 feature 时,对于用户来不及提交的改动,我们会缓存到各个项目的 stash 中,(PS:所以代码突然不见了不要担心,都在 git 的 stash 里面),而当用户切换回某个 feature 时,我们会把和该 feature 分支同名的 stash 恢复回来,从而使用户可以继续开发之前未完成的部分,因为需要通过 feature 的分支名来匹配 stash,而 git stash 又没有提供给 stash 命名的功能,所以我们实现了 [big-stash](https://github.com/BigKeeper/big-stash) 来完成这个功能;
         | 
| 64 | 
            -
            - git。
         | 
| 65 | 
            -
             | 
| 66 | 
            -
            ## feature start 流程
         | 
| 67 | 
            -
             | 
| 68 | 
            -
            
         | 
| 69 | 
            -
             | 
| 70 | 
            -
            ## feature finish 流程
         | 
| 71 | 
            -
             | 
| 72 | 
            -
            
         | 
| 73 | 
            -
             | 
| 74 | 
            -
            ## feature switch 流程
         | 
| 75 | 
            -
             | 
| 76 | 
            -
            
         | 
| 77 | 
            -
             | 
| 78 | 
            -
            ## feature update 流程
         | 
| 79 | 
            -
             | 
| 80 | 
            -
            
         | 
| 81 | 
            -
             | 
| 82 | 
            -
            ## feature pull 流程
         | 
| 83 | 
            -
             | 
| 84 | 
            -
            
         | 
| 85 | 
            -
             | 
| 86 | 
            -
            ## feature push 流程
         | 
| 87 | 
            -
             | 
| 88 | 
            -
            
         |