bigkeeper 0.7.3

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.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/.github/ISSUE_TEMPLATE.md +20 -0
  3. data/.gitignore +50 -0
  4. data/.travis.yml +17 -0
  5. data/CODE_OF_CONDUCT.md +46 -0
  6. data/CONTRIBUTING.md +70 -0
  7. data/Gemfile +10 -0
  8. data/Gemfile.lock +114 -0
  9. data/LICENSE +21 -0
  10. data/README.md +109 -0
  11. data/Rakefile +2 -0
  12. data/big_keeper.gemspec +47 -0
  13. data/bin/big +14 -0
  14. data/bin/setup +8 -0
  15. data/docs/en-US/FEATURE.md +0 -0
  16. data/docs/en-US/README.md +50 -0
  17. data/docs/zh-CN/BIGKEEPER_FILE.md +62 -0
  18. data/docs/zh-CN/FEATURE&HOTFIX.md +121 -0
  19. data/docs/zh-CN/PODFILE.md +43 -0
  20. data/docs/zh-CN/README.md +107 -0
  21. data/docs/zh-CN/RECOMMEND.md +22 -0
  22. data/docs/zh-CN/RELEASE.md +43 -0
  23. data/lib/big_keeper.rb +295 -0
  24. data/lib/big_keeper/command/feature&hotfix/delete.rb +33 -0
  25. data/lib/big_keeper/command/feature&hotfix/finish.rb +56 -0
  26. data/lib/big_keeper/command/feature&hotfix/pull.rb +24 -0
  27. data/lib/big_keeper/command/feature&hotfix/push.rb +25 -0
  28. data/lib/big_keeper/command/feature&hotfix/rebase.rb +27 -0
  29. data/lib/big_keeper/command/feature&hotfix/start.rb +67 -0
  30. data/lib/big_keeper/command/feature&hotfix/switch.rb +47 -0
  31. data/lib/big_keeper/command/feature&hotfix/update.rb +69 -0
  32. data/lib/big_keeper/command/pod/podfile.rb +69 -0
  33. data/lib/big_keeper/command/release/home.rb +66 -0
  34. data/lib/big_keeper/command/release/module.rb +106 -0
  35. data/lib/big_keeper/model/gitflow_type.rb +31 -0
  36. data/lib/big_keeper/model/operate_type.rb +19 -0
  37. data/lib/big_keeper/model/podfile_model.rb +33 -0
  38. data/lib/big_keeper/model/podfile_type.rb +44 -0
  39. data/lib/big_keeper/service/git_service.rb +186 -0
  40. data/lib/big_keeper/service/module_service.rb +124 -0
  41. data/lib/big_keeper/service/stash_service.rb +45 -0
  42. data/lib/big_keeper/util/bigkeeper_parser.rb +198 -0
  43. data/lib/big_keeper/util/git_operator.rb +142 -0
  44. data/lib/big_keeper/util/gitflow_operator.rb +51 -0
  45. data/lib/big_keeper/util/info_plist_operator.rb +46 -0
  46. data/lib/big_keeper/util/logger.rb +40 -0
  47. data/lib/big_keeper/util/pod_operator.rb +15 -0
  48. data/lib/big_keeper/util/podfile_detector.rb +108 -0
  49. data/lib/big_keeper/util/podfile_module.rb +64 -0
  50. data/lib/big_keeper/util/podfile_operator.rb +166 -0
  51. data/lib/big_keeper/util/xcode_operator.rb +13 -0
  52. data/lib/big_keeper/version.rb +3 -0
  53. data/resources/banner.png +0 -0
  54. data/resources/keynote/big-keeper-readme-example.key +0 -0
  55. data/resources/keynote/big-keeper-readme-feature.key +0 -0
  56. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.001.jpeg +0 -0
  57. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.002.jpeg +0 -0
  58. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.003.jpeg +0 -0
  59. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.004.jpeg +0 -0
  60. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.005.jpeg +0 -0
  61. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.006.jpeg +0 -0
  62. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.007.jpeg +0 -0
  63. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.008.jpeg +0 -0
  64. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.009.jpeg +0 -0
  65. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.010.jpeg +0 -0
  66. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.011.jpeg +0 -0
  67. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.012.jpeg +0 -0
  68. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.013.jpeg +0 -0
  69. data/resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.014.jpeg +0 -0
  70. data/resources/keynote/big-keeper-readme-release.key +0 -0
  71. data/resources/readme/big-keeper-readme.001.png +0 -0
  72. data/resources/readme/big-keeper-readme.002.png +0 -0
  73. data/resources/readme/big-keeper-readme.003.png +0 -0
  74. data/resources/readme/big-keeper-readme.004.png +0 -0
  75. data/resources/readme/big-keeper-readme.005.png +0 -0
  76. data/resources/readme/big-keeper-readme.006.png +0 -0
  77. data/resources/readme/big-keeper-readme.007.png +0 -0
  78. data/resources/readme/big-keeper-readme.008.png +0 -0
  79. data/resources/readme/big-keeper-readme.009.png +0 -0
  80. data/resources/readme/big-keeper-readme.010.png +0 -0
  81. data/resources/readme/big-keeper-readme.011.png +0 -0
  82. data/resources/readme/big-keeper-readme.012.png +0 -0
  83. metadata +311 -0
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,47 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "big_keeper/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bigkeeper"
8
+ spec.version = BigKeeper::VERSION
9
+ spec.authors = ["mmoaay"]
10
+ spec.email = ["mmoaay@sina.com"]
11
+
12
+ spec.summary = %q{Efficiency improvement for iOS modular development.}
13
+ spec.description = %q{Efficiency improvement for iOS modular development, iOSer using this tool can make modular development easier.}
14
+ spec.homepage = "https://github.com/BigKeeper/big-keeper"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "bin"
30
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_runtime_dependency "gli", "~> 2.16"
34
+ spec.add_runtime_dependency "big_stash", "~> 0.1"
35
+ spec.add_runtime_dependency "cocoapods"
36
+ spec.add_runtime_dependency "plist"
37
+ spec.add_runtime_dependency "colorize"
38
+
39
+ spec.add_development_dependency "bundler", "~> 1.15"
40
+ spec.add_development_dependency "rake", "~> 10.0"
41
+ spec.add_development_dependency "gli", "~> 2.16"
42
+ spec.add_development_dependency "big_stash", "~> 0.1"
43
+ spec.add_development_dependency "cocoapods"
44
+ spec.add_development_dependency "plist"
45
+ spec.add_development_dependency "colorize"
46
+ spec.add_development_dependency "rubocop", "~> 0.50.0"
47
+ end
data/bin/big ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # require "bundler/setup"
4
+ require "big_keeper"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
File without changes
@@ -0,0 +1,50 @@
1
+ [中文](../zh-CN/README.md)
2
+
3
+ ---
4
+
5
+ # bigkeeper - All in home project
6
+
7
+ [![Build Status](https://travis-ci.org/BigKeeper/bigkeeper.svg?branch=master)](https://travis-ci.org/BigKeeper/bigkeeper)
8
+ [![Maintainability](https://api.codeclimate.com/v1/badges/c6dc4161e84fcec9a890/maintainability)](https://codeclimate.com/github/BigKeeper/big-keeper/maintainability)
9
+ [![Gem Version](https://badge.fury.io/rb/bigkeeper.svg)](https://rubygems.org/gems/bigkeeper)
10
+ [![Language: Ruby](https://img.shields.io/badge/language-Ruby-da212f.svg)](https://www.ruby-lang.org/)
11
+ [![License](https://img.shields.io/badge/license-MIT-000000.svg)](https://github.com/BigKeeper/big-keeper/blob/master/LICENSE)
12
+ [![Gitter](https://img.shields.io/gitter/room/BigKeeper/BigKeeper.svg)](https://gitter.im/Big-Keeper/Lobby)
13
+
14
+ bigkeeper is an efficiency improvement for iOS&Android modular development, iOSer&Android using this tool can make modular development easier.
15
+
16
+ ## Installation
17
+
18
+ Add this line to your application's Gemfile:
19
+
20
+ ```ruby
21
+ gem 'bigkeeper'
22
+ ```
23
+
24
+ And then execute:
25
+
26
+ $ bundle
27
+
28
+ Or install it yourself as:
29
+
30
+ $ gem install bigkeeper
31
+
32
+ ## Usage
33
+
34
+ Run `big` to learn how to use bigkeeper.
35
+
36
+ ## Development
37
+
38
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
39
+
40
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
41
+
42
+ ## Contributing
43
+
44
+ Bug reports and pull requests are welcome on GitHub at https://github.com/BigKeeper/bigkeeper.
45
+
46
+ ## License
47
+
48
+ ![](https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/License_icon-mit-88x31-2.svg/128px-License_icon-mit-88x31-2.svg.png)
49
+
50
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,62 @@
1
+ # Bigkeeper 文件
2
+
3
+ 首先,我们在主项目 Podfile 所在的目录加入 **Bigkeeper** 文件。
4
+
5
+ ## 配置版本
6
+
7
+ ```
8
+ version '2.8.8'
9
+ ```
10
+
11
+ 版本号的用途有:
12
+
13
+ - feature 和 hotfix 流程里面做为分支名前缀的一部分,方便后期通过版本号匹配分支;
14
+ - release 流程里面做为发布版本号,影响范围包括业务模块和主项目。
15
+
16
+ ## 配置主项目
17
+
18
+ ```
19
+ home 'BigKeeperMain', :git => 'git@github.com:BigKeeper/BigKeeperMain.git', :pulls => 'https://github.com/BigKeeper/BigKeeperMain/pulls'
20
+ ```
21
+
22
+ 这个配置包含三个部分:
23
+
24
+ - 主项目的名字;
25
+ - 主项目的 git 远程仓库地址;
26
+ - 主项目的 pull request / merge request 页面地址,完成某个 feature / hotfix 时,会自动打开这个页面,让开发者提交 pull request / merge request。
27
+
28
+ ## 配置业务模块
29
+
30
+ ```
31
+ modules do
32
+ pod 'BigKeeperModular', :git => 'git@github.com:BigKeeper/BigKeeperModular.git', :pulls => 'https://github.com/BigKeeper/BigKeeperModular/pulls'
33
+ end
34
+ ```
35
+
36
+ 这个配置包含可以配置多个业务模块,建议是把当前所有非第三方库都加入到这个配置里面:
37
+
38
+ - 业务模块在 Podfile 中的名字;
39
+ - 业务模块的 git 远程仓库地址;
40
+ - 业务模块的 pull request / merge request 页面地址,完成某个 feature / hotfix 时,会自动打开这个页面,让开发者提交 pull request / merge request。
41
+
42
+ ## 配置用户自定义信息
43
+
44
+ ```
45
+ user 'perry' do
46
+ pod 'BigKeeperModular', :path => '../BigKeeperModular'
47
+ end
48
+ ```
49
+
50
+ 如果用户需要配置一些自定义信息,比如业务模块在本地的路径,就可以增加一个这样的配置。
51
+
52
+ 这个配置同样支持对指定的用户名(上述配置用户名为 perry)配置多个业务模块,目前支持的是:
53
+
54
+ - 配置业务模块的本地路径,通过这个路径,我们就可以在主工程直接对业务模块做一些 CocoaPods 和 git 相关的操作。
55
+
56
+ > 注:
57
+ >
58
+ > 1. 默认用户名是 git global config 的 user.name;
59
+ >
60
+ > 2. 默认我们会把本地路径配置成 `../{业务模块在 Podfile 中的名字}` 的形式,因为大部分情况下,我们会把项目都放在同级目录下,这也是我们推荐的;
61
+ >
62
+ > 3. 另外,在使用 bigkeeper 相关功能时,如果某些业务模块并没有 clone 到本地,bigkeeper 会根据之前配置的业务模块远程 git 地址 clone 业务模块仓库到**主项目同级目录下**。
@@ -0,0 +1,121 @@
1
+ # feature - 功能开发流程 & hotfix - 线上修复流程
2
+
3
+ > 注:hotfix 除了基础分支是 **master**,其他操作和 feature 一致,所以我们这里以 feature 为例说明。
4
+
5
+ 直接在命令行执行 `big feature --help` 可以查看其提供的所有功能:
6
+
7
+ ```
8
+ NAME
9
+ feature - Feature operations
10
+
11
+
12
+ SYNOPSIS
13
+ big [global options] feature delete
14
+ big [global options] feature finish
15
+ big [global options] feature list
16
+ big [global options] feature pull
17
+ big [global options] feature push
18
+ big [global options] feature start
19
+ big [global options] feature switch
20
+ big [global options] feature update
21
+
22
+ COMMANDS
23
+ delete - Delete feature with name
24
+ finish - Finish current feature
25
+ list - List all the features
26
+ pull - Pull remote changes for current feature
27
+ push - Push local changes to remote for current feature
28
+ start - Start a new feature with name for given modules and main project
29
+ switch - Switch to the feature with name
30
+ update - Update modules for the feature with name
31
+ ```
32
+
33
+ 功能列表如下:
34
+
35
+ - start:
36
+ 开始一个新的 feature,输入参数依次为:
37
+ - feature 的名字;
38
+ - 开发该 feature 需要改动的业务模块名。可以多个,用空格隔开;如果不指定,取 **Bigkeeper 文件中所有的业务模块名**。
39
+ - finish:结束当前 feature;
40
+ - switch:切换到一个已经存在的 feature,输入参数为 feature 名;
41
+ - update:
42
+ 更新一个 feature 需要改动的业务模块,输入参数依次为:
43
+ - feature 的名字;
44
+ - 开发该 feature 需要改动的业务模块名。可以多个,用空格隔开;如果不指定,取 **Bigkeeper 文件中所有的业务模块名**。
45
+ - pull:拉取当前 feature 主项目和业务模块的远程 git 仓库更新;
46
+ - push:提交并推送当前 feature 主项目和业务模块的本地变更到远程 git 仓库,输入参数为提交信息;
47
+ - delete:根据 featue 名删除主项目和业务模块所有相关分支;(PS:慎用,因为会删除本地和远程所有相关分支)
48
+ - list:显示当前的 feature 列表。
49
+
50
+ ## 各个流程的使用场景
51
+
52
+ - 如果需要开发新的功能,使用 bigkeeper feature start;
53
+ - 开发功能过程中如果发现某个模块其实不用改动,使用 bigkeeper feature update 来把这个模块从这个 feature 移除;
54
+ - 使用 bigkeeper feature pull 来同步主项目和相关业务模块远端变更;
55
+ - 使用 bigkeeper feature push 来推送主项目和相关业务模块变更到远端;
56
+ - 使用 bigkeeper feature switch 来切换 feature,比如:两个功能并行开发的时候,就可以用这个命令互相切换了;
57
+ - 功能开发完成,需要提交 PR 时,使用 bigkeeper feature finish 结束开发;
58
+ - 如果开发过程中突然有新的功能需要紧急开发,直接使用 bigkeeper feature start 进行新功能开发,旧功能未提交的内容我们会保存在 stash 中。
59
+
60
+ ## feature 的工作区
61
+
62
+ ![](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.002.jpeg)
63
+
64
+ feature 的工作区主要由两部分组成:
65
+
66
+ - 主项目;
67
+ - 相关业务模块,我们把 Podfile 中引用方式为 `:path => {业务模块本地路径}` 的模块做为相关业务模块。
68
+
69
+ 主项目和每个相关业务模块又有各自的工作区,由三个部分组成:
70
+
71
+ - 当前代码区改动;
72
+ - stash 缓存区,当用户需要切换新的 feature 时,对于用户来不及提交的改动,我们会缓存到各个项目的 stash 中,(PS:所以代码突然不见了不要担心,都在 git 的 stash 里面),而当用户切换回某个 feature 时,我们会把和该 feature 分支同名的 stash 恢复回来,从而使用户可以继续开发之前未完成的部分,因为需要通过 feature 的分支名来匹配 stash,而 git stash 又没有提供给 stash 命名的功能,所以我们实现了 [bigstash](https://github.com/BigKeeper/bigstash) 来完成这个功能;
73
+ - git。
74
+
75
+ ## 工作区缓存流程
76
+
77
+ ![stash 当前工作区](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.003.jpeg)
78
+
79
+ ## master/develop 分支状态检查流程
80
+
81
+ ![检查 master/develop 分支状态](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.004.jpeg)
82
+
83
+ ## 切换分支流程
84
+
85
+ ![切换分支](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.005.jpeg)
86
+
87
+ ## 同步业务模块与主项目分支流程
88
+
89
+ ![同步业务模块与主项目分支](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.006.jpeg)
90
+
91
+ ## finish 业务模块 feature/hotfix 流程
92
+
93
+ ![finish 业务模块 feature/hotfix](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.007.jpeg)
94
+
95
+ ## 从 feature/hotfix 移除模块流程
96
+
97
+ ![从 feature/hotfix 移除模块](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.008.jpeg)
98
+
99
+ ## feature start 流程
100
+
101
+ ![start](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.009.jpeg)
102
+
103
+ ## feature finish 流程
104
+
105
+ ![finish](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.010.jpeg)
106
+
107
+ ## feature switch 流程
108
+
109
+ ![switch](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.011.jpeg)
110
+
111
+ ## feature update 流程
112
+
113
+ ![update](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.012.jpeg)
114
+
115
+ ## feature pull 流程
116
+
117
+ ![pull](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.013.jpeg)
118
+
119
+ ## feature push 流程
120
+
121
+ ![push](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.014.jpeg)
@@ -0,0 +1,43 @@
1
+ # podfile - podfile版本控制流程
2
+
3
+ 直接在命令行执行 `big podfile --help` 可以查看其提供的所有功能
4
+
5
+ ```
6
+ NAME
7
+ podfile - Podfile operation
8
+
9
+ SYNOPSIS
10
+ big [global options] podfile [command options] detect
11
+ big [global options] podfile [command options] lock
12
+ big [global options] podfile [command options] upgrade
13
+
14
+ COMMAND OPTIONS
15
+ --pod, --podfile=arg - (default: none)
16
+
17
+ COMMANDS
18
+ detect - Detect podname should be locked.
19
+ lock - Lock podname should be locked.
20
+ upgrade - Update module version
21
+
22
+ ```
23
+
24
+ 全局参数如下:
25
+
26
+ - -pod --podfile :podfile文件路径
27
+
28
+ 功能列表如下:
29
+
30
+ - detect:
31
+ 检测当前同步到本地的项目工程中podfile,得到未锁定的第三方库。
32
+ 如果存在,提示需要指定版本。
33
+ 如果不存在,提示无需指定版本的第三方库。
34
+
35
+ - lock:
36
+ 检测到存在需指定代版本的三方库后,执行lock指令对所有需要锁定的库进行锁定。
37
+
38
+ - upgrade:
39
+ 检测配置文件中指定业务库,有无最新可更新版本。
40
+
41
+ ## podfile lock 流程
42
+
43
+ ![](../../resources/readme/big-keeper-readme.011.png)
@@ -0,0 +1,107 @@
1
+ [English](../en-US/README.md)
2
+
3
+ ---
4
+
5
+ # bigkeeper
6
+
7
+ [![Build Status](https://travis-ci.org/BigKeeper/bigkeeper.svg?branch=master)](https://travis-ci.org/BigKeeper/bigkeeper)
8
+ [![Maintainability](https://api.codeclimate.com/v1/badges/c6dc4161e84fcec9a890/maintainability)](https://codeclimate.com/github/BigKeeper/big-keeper/maintainability)
9
+ [![Gem Version](https://badge.fury.io/rb/bigkeeper.svg)](https://rubygems.org/gems/bigkeeper)
10
+ [![Language: Ruby](https://img.shields.io/badge/language-Ruby-da212f.svg)](https://www.ruby-lang.org/)
11
+ [![License](https://img.shields.io/badge/license-MIT-000000.svg)](https://github.com/BigKeeper/big-keeper/blob/master/LICENSE)
12
+ [![Gitter](https://img.shields.io/gitter/room/BigKeeper/BigKeeper.svg)](https://gitter.im/Big-Keeper/Lobby)
13
+
14
+ bigkeeper 是一个 **iOS&Android 模块化项目**效率提升工具,使用这个工具后,开发者**在主项目内**即可完成**包括其他业务模块在内**所有代码的编写和管理。
15
+
16
+ > 注:目前只支持依赖 CocoaPods 管理的模块化工程。
17
+
18
+ 我们借鉴 CocoaPods 的做法,开发团队只需要在主项目中加入一个 Bigkeeper 文件,然后利用我们提供的 `bigkeeper` 工具,即可更便捷的实现**代码分支**和**业务模块**的管理;另外,通过我们提供的工具,也能帮助开发者养成更规范的日常开发习惯,减轻项目管理者的负担。
19
+
20
+ ## 应用场景
21
+
22
+ 在模块化项目的过渡阶段,我们往往会碰到业务拆分不是那么彻底的情况(PS:比如主项目中仍然存在业务相关代码),这样就会导致一系列问题:
23
+
24
+ - 开发者开发一个 feature 时需要维护多个项目的分支,同时还要频繁修改主项目的 `Podfile`;
25
+ - 项目管理者需要花很大精力去和团队成员同步项目管理规范流程,尤其对于新人,挑战很大;
26
+ - 开发过程中如果碰到突发情况需要开新分支处理问题时对当前工作区的保存操作会很繁琐(PS:因为涉及到多个项目);
27
+ - 日常开发过程中类似 commit、pull、push 等操作比较繁琐(PS:因为涉及到多个项目)。
28
+
29
+ bigkeeper 的出现就是为了解决这些问题。
30
+
31
+ > 注:也有很多人认为直接做一个完整的组件化项目更合理,而不需要采用这样曲折的方案,但是很多时候我们并没有这么多的精力直接去做这些事情,bigkeeper 存在的价值也是为了帮助开发团队在 **iOS&Android 模块化项目过渡阶段**能更轻松的往前走。
32
+
33
+ ## 安装
34
+
35
+ - 当作 Ruby Gem 使用:
36
+ 在项目的 Gemfile 中加入下面这行:
37
+
38
+ ```ruby
39
+ gem 'bigkeeper'
40
+ ```
41
+
42
+ 然后执行:
43
+
44
+ $ bundle
45
+
46
+ - 直接安装:
47
+
48
+ $ gem install bigkeeper
49
+
50
+ ## 使用方法
51
+
52
+ > 注:每个流程我们都提供详细的流程图来让你了解我们都做了些什么,为了方便你更好的了解我们的流程,我们提供了一个流程参考图,如下:
53
+ >
54
+ > ![](../../resources/keynote/big-keeper-readme-feature/big-keeper-readme-feature.001.jpeg)
55
+
56
+ - [Bigkeeper 文件配置](BIGKEEPER_FILE.md)
57
+ - `bigkeeper` 工具使用:
58
+
59
+ 直接在命令行执行 `bigkeeper` 可以查看其提供的所有功能:
60
+
61
+ ```
62
+ NAME
63
+ big - Efficiency improvement for iOS&Android modular development, iOSer&Android using this tool can make modular development easier.
64
+
65
+ SYNOPSIS
66
+ big [global options] command [command options] [arguments...]
67
+
68
+ GLOBAL OPTIONS
69
+ --help - Show this message
70
+ -p, --path=arg - (default: ./)
71
+ -u, --user=arg - (default: mmoaay)
72
+
73
+ -v, --ver=arg - (default: Version in Bigkeeper file)
74
+
75
+ COMMANDS
76
+ feature - Feature operations
77
+ help - Shows a list of commands or help for one command
78
+ hotfix - Hotfix operations
79
+ podfile - Podfile operation
80
+ release - Release operations
81
+ version - Version
82
+ ```
83
+
84
+ 全局参数如下:
85
+
86
+ - -p, --path:主项目所在的目录,默认是执行 bigkeeper 命令的当前目录;
87
+ - -v, --ver:版本号,如果没有指定的话,会以主项目 [Bigkeeper 文件](BIGKEEPER_FILE.md)中指定的版本为准。
88
+ - -u, --user:用户名,默认是 git global config 的 user.name,会显示在命令提示信息中,比如上述提示信息中的默认用户名是 mmoaay
89
+
90
+ 功能列表如下:
91
+
92
+ - [feature](FEATURE&HOTFIX.md):功能开发流程;
93
+ - [hotfix](FEATURE&HOTFIX.md):线上修复流程;
94
+ - [release](RELEASE.md):发布流程;
95
+ - [podfile](PODFILE.md):Podfile 操作流程;
96
+ - version:查看 bigkeeper 当前版本号;
97
+ - help:查看 bigkeeper 帮助文档。
98
+
99
+ ## 其他
100
+
101
+ - [一些建议](RECOMMEND.md)
102
+
103
+ ## 协议
104
+
105
+ ![](https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/License_icon-mit-88x31-2.svg/128px-License_icon-mit-88x31-2.svg.png)
106
+
107
+ bigkeeper 基于 MIT 协议进行分发和使用,更多信息参见协议文件。