big_keeper 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,86 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby
|
2
|
-
require 'big_keeper/util/podfile_operator'
|
3
|
-
require 'big_keeper/util/gitflow_operator'
|
4
|
-
require 'big_keeper/model/podfile_type'
|
5
|
-
require 'big_keeper/util/info_plist_operator'
|
6
|
-
require 'big_keeper/util/git_operator'
|
7
|
-
require 'big_keeper/util/logger'
|
8
|
-
|
9
|
-
module BigKeeper
|
10
|
-
def self.start_module_release(path, version, user, module_name)
|
11
|
-
BigkeeperParser.parse("#{path}/Bigkeeper")
|
12
|
-
Dir.chdir(path) do
|
13
|
-
module_release(BigkeeperParser::module_path(user, module_name),
|
14
|
-
version,
|
15
|
-
module_name,
|
16
|
-
GitInfo.new(BigkeeperParser::home_git, GitType::TAG, version),
|
17
|
-
user)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
def self.module_release(module_path, version, module_name, source, user)
|
23
|
-
Dir.chdir(module_path) do
|
24
|
-
if GitOperator.new.has_changes(module_path)
|
25
|
-
StashService.new.stash_all(module_path, GitOperator.new.current_branch(module_path), user, module_name.split())
|
26
|
-
end
|
27
|
-
|
28
|
-
# step 1 checkout release
|
29
|
-
Logger.highlight(%Q(Start checkout #{module_name} to Branch release/#{version}))
|
30
|
-
if GitOperator.new.current_branch(module_path) != "release/#{version}"
|
31
|
-
if GitOperator.new.has_branch(module_path, "release/#{version}")
|
32
|
-
GitOperator.new.git_checkout(module_path, "release/#{version}")
|
33
|
-
else
|
34
|
-
GitflowOperator.new.start(module_path, version, GitflowType::RELEASE)
|
35
|
-
GitOperator.new.first_push(module_path, "release/#{version}")
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
#修改 podspec 文件
|
40
|
-
# TO DO: - advanced to use Regular Expression
|
41
|
-
PodfileOperator.new.podspec_change(%Q(#{module_path}/#{module_name}.podspec), version, module_name)
|
42
|
-
GitOperator.new.commit(module_path, "update podspec")
|
43
|
-
GitOperator.new.first_push(module_path, GitOperator.new.current_branch(module_path))
|
44
|
-
|
45
|
-
# Pod lib lint in release/#{tag} branch
|
46
|
-
Logger.highlight(%Q(Start Pod lib lint #{module_name}))
|
47
|
-
has_error = false
|
48
|
-
IO.popen("pod lib lint --allow-warnings --verbose --use-libraries --sources=#{BigkeeperParser::sourcemodule_path}") do |io|
|
49
|
-
io.each do |line|
|
50
|
-
has_error = true if line.include? "ERROR"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
if has_error
|
54
|
-
Logger.error("Pod lib error in '#{module_name}'")
|
55
|
-
return
|
56
|
-
end
|
57
|
-
|
58
|
-
# check out master
|
59
|
-
if GitOperator.new.current_branch(module_path) != "master"
|
60
|
-
current_name = GitOperator.new.current_branch(module_path)
|
61
|
-
GitOperator.new.git_checkout(module_path, "master")
|
62
|
-
Logger.highlight("Push branch '#{branch_name}' for '#{module_name}'...")
|
63
|
-
GitService.new.verify_push(module_path, "finish #{GitflowType.name(GitflowType::RELEASE)} #{branch_name}", "master", "#{module_name}")
|
64
|
-
end
|
65
|
-
|
66
|
-
# to do rebase release to master
|
67
|
-
Logger.highlight(%Q(Rebase develop to master))
|
68
|
-
GitService.new.verify_rebase(module_path, 'develop', "#{module_name}")
|
69
|
-
|
70
|
-
Logger.highlight(%Q(Start Pod repo push #{module_name}))
|
71
|
-
IO.popen("pod repo push #{module_name} #{module_name}.podspec --allow-warnings --sources=#{BigkeeperParser::sourcemodule_path}") do |io|
|
72
|
-
io.each do |line|
|
73
|
-
has_error = true if line.include? "ERROR"
|
74
|
-
end
|
75
|
-
end
|
76
|
-
if has_error
|
77
|
-
Logger.error("Pod repo push in '#{module_name}'")
|
78
|
-
return
|
79
|
-
end
|
80
|
-
|
81
|
-
GitOperator.new.tag(module_path, version)
|
82
|
-
|
83
|
-
Logger.highlight(%Q(Success release #{module_name}))
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
cd $(dirname $0)
|
4
|
-
|
5
|
-
diff=`git diff`
|
6
|
-
|
7
|
-
|
8
|
-
if [ ${#diff} != 0 ];
|
9
|
-
then
|
10
|
-
echo "还有东西没有提交"
|
11
|
-
exit 1
|
12
|
-
fi
|
13
|
-
|
14
|
-
echo "--------tag list--------"
|
15
|
-
git tag -l
|
16
|
-
echo "--------tag list--------"
|
17
|
-
|
18
|
-
echo "根据上面的tag输入新tag"
|
19
|
-
read thisTag
|
20
|
-
|
21
|
-
# 获取podspec文件名
|
22
|
-
podSpecName=`ls|grep ".podspec$"|sed "s/\.podspec//g"`
|
23
|
-
echo $podSpecName
|
24
|
-
|
25
|
-
# 修改版本号
|
26
|
-
sed -i "" "s/s.version *= *[\"\'][^\"]*[\"\']/s.version=\"$thisTag\"/g" $podSpecName.podspec
|
27
|
-
|
28
|
-
pod cache clean --all
|
29
|
-
|
30
|
-
pod lib lint --allow-warnings --verbose --use-libraries
|
31
|
-
|
32
|
-
|
33
|
-
# 验证失败退出
|
34
|
-
if [ $? != 0 ];then
|
35
|
-
exit 1
|
36
|
-
fi
|
37
|
-
|
38
|
-
|
39
|
-
git commit $podSpecName.podspec -m "update podspec"
|
40
|
-
git push
|
41
|
-
git tag -m "update podspec" $thisTag
|
42
|
-
git push --tags
|
43
|
-
|
44
|
-
pod repo push specs $podSpecName.podspec --allow-warnings
|
Binary file
|
Binary file
|
Binary file
|