ggsm 1.0.0 → 1.0.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/ggsm-1.0.0.gem +0 -0
- data/lib/ggsm/flow/finish.rb +52 -0
- data/lib/ggsm/flow/switch.rb +2 -0
- data/lib/ggsm/version.rb +1 -1
- data/lib/ggsm.rb +7 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0becae26dd9412725ec0aaa41e067be0b92b5412
|
4
|
+
data.tar.gz: f99f03d56b2a956a9b8bc5a04fe5525bb9bfa1ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d6db5af5878df733ea14abef954121302f147237036095b577e0eb843296e241be5b39fdafbf3d8b9118d384849fdba5d9f5a22178e6e06bfb72b47fd9a59f9
|
7
|
+
data.tar.gz: a94420a6d9a7a3a7e69684c71fa677aeac62e43a2e780b53e472ce7562efe4c10fadd70d4b18bdf2a771b4495ac6f04130c9d70d34de7d8f2d5e0ab32edc5d6f
|
data/ggsm-1.0.0.gem
ADDED
Binary file
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'colorize'
|
2
|
+
require_relative '../util/submodule'
|
3
|
+
require_relative '../util/stash'
|
4
|
+
|
5
|
+
module GGSM
|
6
|
+
module Finish
|
7
|
+
include Submodule
|
8
|
+
include Stash
|
9
|
+
|
10
|
+
def start_flow(branch, action)
|
11
|
+
unless check_submodule
|
12
|
+
return
|
13
|
+
end
|
14
|
+
|
15
|
+
puts '==> 进入主工程:'.yellow
|
16
|
+
|
17
|
+
arry_conflict = []
|
18
|
+
|
19
|
+
need_stash = try_stash
|
20
|
+
result = system "git checkout -b #{branch} #{action}"
|
21
|
+
if need_stash
|
22
|
+
stash_pop(arry_conflict, '主工程')
|
23
|
+
end
|
24
|
+
|
25
|
+
unless result
|
26
|
+
return
|
27
|
+
end
|
28
|
+
|
29
|
+
`git submodule update --init --recursive`
|
30
|
+
|
31
|
+
subs = get_submodule
|
32
|
+
subs.each do |sub|
|
33
|
+
Dir.chdir sub
|
34
|
+
puts "==> 进入#{sub}:".yellow
|
35
|
+
need_stash = try_stash
|
36
|
+
system "git checkout -b #{branch}"
|
37
|
+
if need_stash
|
38
|
+
stash_pop(arry_conflict, sub)
|
39
|
+
end
|
40
|
+
Dir.chdir '..'
|
41
|
+
end
|
42
|
+
|
43
|
+
if arry_conflict.size > 0
|
44
|
+
tip = '==> 冲突待解决:'
|
45
|
+
arry_conflict.each do |sub|
|
46
|
+
tip = "#{tip} #{sub}"
|
47
|
+
end
|
48
|
+
puts tip.red
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/ggsm/flow/switch.rb
CHANGED
data/lib/ggsm/version.rb
CHANGED
data/lib/ggsm.rb
CHANGED
@@ -6,6 +6,7 @@ require_relative 'ggsm/flow/sync'
|
|
6
6
|
require_relative 'ggsm/flow/switch'
|
7
7
|
require_relative 'ggsm/flow/delete'
|
8
8
|
require_relative 'ggsm/flow/foreach'
|
9
|
+
require_relative 'ggsm/flow/finish'
|
9
10
|
|
10
11
|
module GGSM
|
11
12
|
class Cli < Thor
|
@@ -15,6 +16,7 @@ module GGSM
|
|
15
16
|
include Switch
|
16
17
|
include Delete
|
17
18
|
include Foreach
|
19
|
+
include Finish
|
18
20
|
|
19
21
|
desc 'start <branch> [<commit>] [<origin>]', 'Start to develop new feature'
|
20
22
|
def start(branch, action='')
|
@@ -49,5 +51,10 @@ module GGSM
|
|
49
51
|
def foreach(*commands)
|
50
52
|
foreach_flow(*commands)
|
51
53
|
end
|
54
|
+
|
55
|
+
desc 'finish <branch>', 'Finish the feature'
|
56
|
+
def finish(branch)
|
57
|
+
finish_flow(branch)
|
58
|
+
end
|
52
59
|
end
|
53
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ggsm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YoKey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,9 +83,11 @@ files:
|
|
83
83
|
- README.md
|
84
84
|
- Rakefile
|
85
85
|
- bin/ggsm
|
86
|
+
- ggsm-1.0.0.gem
|
86
87
|
- ggsm.gemspec
|
87
88
|
- lib/ggsm.rb
|
88
89
|
- lib/ggsm/flow/delete.rb
|
90
|
+
- lib/ggsm/flow/finish.rb
|
89
91
|
- lib/ggsm/flow/foreach.rb
|
90
92
|
- lib/ggsm/flow/start.rb
|
91
93
|
- lib/ggsm/flow/switch.rb
|