big_keeper 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18a0e9bf18ad96844aa32421e09b56aa48681fd9
|
4
|
+
data.tar.gz: 63ea947213a94d6b8707acf5232d2dc7e475f9ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af8e302003e39f9b0b5c020eb45429166843420fa0ec01fcff02e8eff2be215b33d6f5195e645e0e44f292e7994abb36db532af24aa8175251d4ea6864a3e3c8
|
7
|
+
data.tar.gz: 30fcdf96aeecee91a1518944c029b92d2e6f6b04aa0d43d967e060dc6bf5fd2a02dfbe4e75664345a3afde80bf7f18e8d566e5835ea85197921e5b126747c4ba
|
data/Gemfile.lock
CHANGED
@@ -14,9 +14,8 @@ module BigKeeper
|
|
14
14
|
ModuleService.new.pull(path, user, module_name, branch_name)
|
15
15
|
end
|
16
16
|
|
17
|
-
p
|
17
|
+
p "Pull branch #{branch_name} for home..."
|
18
18
|
GitOperator.new.pull(path, branch_name)
|
19
|
-
p 'Finish pulling home...'
|
20
19
|
ensure
|
21
20
|
end
|
22
21
|
end
|
@@ -16,20 +16,18 @@ module BigKeeper
|
|
16
16
|
module_branch_name = GitOperator.new.current_branch(module_full_path)
|
17
17
|
|
18
18
|
if GitOperator.new.has_changes(module_full_path)
|
19
|
-
p "
|
19
|
+
p "Push branch #{branch_name} for module #{module_name}..."
|
20
20
|
GitOperator.new.commit(module_full_path, comment)
|
21
21
|
GitOperator.new.push(module_full_path, module_branch_name)
|
22
|
-
p "Finish pushing #{module_name}..."
|
23
22
|
else
|
24
23
|
p "Nothing to push for #{module_name}."
|
25
24
|
end
|
26
25
|
end
|
27
26
|
|
28
27
|
if GitOperator.new.has_changes(path)
|
29
|
-
p "
|
28
|
+
p "Push branch #{branch_name} for home..."
|
30
29
|
GitOperator.new.commit(path, comment)
|
31
30
|
GitOperator.new.push(path, branch_name)
|
32
|
-
p "Finish pushing home..."
|
33
31
|
else
|
34
32
|
p "Nothing to push for home."
|
35
33
|
end
|
@@ -11,23 +11,23 @@ module BigKeeper
|
|
11
11
|
GitOperator.new.clone(File.expand_path("#{module_full_path}/../"), module_git)
|
12
12
|
GitOperator.new.git_checkout(module_full_path, branch_name)
|
13
13
|
else
|
14
|
-
|
15
|
-
if
|
16
|
-
p "Current branch of #{module_name} is #{
|
14
|
+
current_branch_name = GitOperator.new.current_branch(module_full_path)
|
15
|
+
if current_branch_name != branch_name
|
16
|
+
p "Current branch of #{module_name} is #{current_branch_name},\
|
17
17
|
stash it and checkout #{branch_name}..."
|
18
|
-
BigStash::StashOperator.new(module_full_path).stash(
|
18
|
+
BigStash::StashOperator.new(module_full_path).stash(current_branch_name)
|
19
19
|
GitOperator.new.git_checkout(module_full_path, branch_name)
|
20
20
|
end
|
21
|
-
p "
|
21
|
+
p "Pull branch #{branch_name} for module #{module_name}..."
|
22
22
|
GitOperator.new.pull(module_full_path, branch_name)
|
23
|
-
p "Finish pulling #{module_name}..."
|
24
23
|
end
|
25
24
|
end
|
26
25
|
|
27
26
|
def switch(path, user, module_name, branch_name)
|
28
27
|
module_full_path = BigkeeperParser.module_full_path(path, user, module_name)
|
29
28
|
|
30
|
-
p "
|
29
|
+
p "Switch to branch #{branch_name} for module #{module_name}..."
|
30
|
+
|
31
31
|
if !File.exist? module_full_path
|
32
32
|
module_git = BigkeeperParser.module_git(module_name)
|
33
33
|
GitOperator.new.clone(File.expand_path("#{module_full_path}/../"), module_git)
|
@@ -36,7 +36,6 @@ module BigKeeper
|
|
36
36
|
GitOperator.new.git_checkout(module_full_path, branch_name)
|
37
37
|
GitOperator.new.pull(module_full_path, branch_name)
|
38
38
|
end
|
39
|
-
p "Finish switching #{module_name}..."
|
40
39
|
end
|
41
40
|
|
42
41
|
def finish(path, user, module_name)
|
@@ -44,6 +43,8 @@ module BigKeeper
|
|
44
43
|
module_full_path = BigkeeperParser.module_full_path(path, user, module_name)
|
45
44
|
branch_name = GitOperator.new.current_branch(module_full_path)
|
46
45
|
|
46
|
+
p "Finish branch #{branch_name} for module #{module_name}..."
|
47
|
+
|
47
48
|
PodfileOperator.new.find_and_replace("#{path}/Podfile",
|
48
49
|
module_name,
|
49
50
|
ModuleType::GIT,
|
@@ -56,15 +57,25 @@ module BigKeeper
|
|
56
57
|
|
57
58
|
def add(path, user, module_name, name, type)
|
58
59
|
branch_name = "#{GitflowType.name(type)}/#{name}"
|
60
|
+
|
61
|
+
p "Add branch #{branch_name} for module #{module_name}..."
|
62
|
+
|
59
63
|
module_full_path = BigkeeperParser.module_full_path(path, user, module_name)
|
60
64
|
|
65
|
+
# clone module if not exist
|
61
66
|
if !File.exist? module_full_path
|
62
67
|
module_git = BigkeeperParser.module_git(module_name)
|
63
68
|
GitOperator.new.clone(File.expand_path("#{module_full_path}/../"), module_git)
|
64
69
|
end
|
65
70
|
|
71
|
+
# stash current branch
|
72
|
+
current_branch_name = GitOperator.new.current_branch(module_full_path)
|
73
|
+
BigStash::StashOperator.new(module_full_path).stash(current_branch_name)
|
74
|
+
|
75
|
+
# start new feature/hotfix
|
66
76
|
GitService.new.start(module_full_path, name, type)
|
67
77
|
|
78
|
+
# apply stash
|
68
79
|
BigStash::StashOperator.new(module_full_path).apply_stash(branch_name)
|
69
80
|
|
70
81
|
module_path = BigkeeperParser.module_path(user, module_name)
|
@@ -76,6 +87,9 @@ module BigKeeper
|
|
76
87
|
|
77
88
|
def del(path, user, module_name, name, type)
|
78
89
|
branch_name = "#{GitflowType.name(type)}/#{name}"
|
90
|
+
|
91
|
+
p "del branch #{branch_name} for module #{module_name}..."
|
92
|
+
|
79
93
|
module_full_path = BigkeeperParser.module_full_path(path, user, module_name)
|
80
94
|
|
81
95
|
BigStash::StashOperator.new(module_full_path).stash(branch_name)
|
data/lib/big_keeper/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmoaay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|