yjcocoa 18.07.17 → 18.07.31
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/README.md +1 -1
- data/lib/yjcocoa/git/git_cache.rb +6 -2
- data/lib/yjcocoa/git/git_tag_add.rb +15 -5
- data/lib/yjcocoa/test.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdbd2fca228241aba011988455e5b1f67b68831e
|
4
|
+
data.tar.gz: d1108511b8494183b56ae77409b4904786c9b3ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45e2b84ce14fb94143d0863da08850eb8bc14355502fedaf017d1b3475ce25f522f34caae8975dfa88a9dd972b995c21a9f02e63c5c5c7d9c4db8a4efd9995b3
|
7
|
+
data.tar.gz: c8534ec06d684f71c8da09e2f6181a1ae002a2d0ea3566f1bb727dada86f54ca563901c2d62a4146c70c250a432c3b421b9cd27bd1a78a2505b23b1148639433
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[](https://www.ruby-lang.org/zh_cn/)
|
4
4
|
[](https://github.com/937447974/YJCocoaGem/blob/master/LICENSE)
|
5
|
-
[](https://rubygems.org/gems/yjcocoa)
|
6
6
|

|
7
7
|
|
8
8
|
# YJCocoaGem
|
@@ -26,7 +26,11 @@ module YJCocoa
|
|
26
26
|
DESC
|
27
27
|
|
28
28
|
def self.options
|
29
|
-
|
29
|
+
if self == YJCocoa::GitCache
|
30
|
+
[['--delete-path', '删除的文件路径,多个路径用‘,’隔开']] + super
|
31
|
+
else
|
32
|
+
super
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
# property
|
@@ -51,7 +55,7 @@ module YJCocoa
|
|
51
55
|
|
52
56
|
def run
|
53
57
|
self.cleanWorkDirectory
|
54
|
-
answer = self.askWithAnswers("
|
58
|
+
answer = self.askWithAnswers("强制推动您的本地更改覆盖您的远端仓库", ["Yes", "No"])
|
55
59
|
if answer == "yes"
|
56
60
|
self.pushOrigin
|
57
61
|
self.cleanRepository
|
@@ -16,23 +16,33 @@ module YJCocoa
|
|
16
16
|
|
17
17
|
self.abstract_command = false
|
18
18
|
self.command = 'add'
|
19
|
-
self.summary = '添加默认 tag(git
|
20
|
-
self.description = '添加默认 tag(git
|
19
|
+
self.summary = '添加默认 tag(git库名-branch-%Y%m%d%H%M)'
|
20
|
+
self.description = '添加默认 tag(git库名-branch-%Y%m%d%H%M)'
|
21
21
|
|
22
22
|
def run
|
23
23
|
if File.exist?(".git")
|
24
|
+
current_branch = self.current_branch
|
24
25
|
tag = File.basename(Dir.pwd)
|
25
|
-
tag <<
|
26
|
-
tag << Time.now.strftime(
|
26
|
+
tag << "-#{current_branch}" unless current_branch =~ /master/
|
27
|
+
tag << "-#{Time.now.strftime('%Y%m%d%H%M')}"
|
27
28
|
puts "YJCocoa build tag #{tag}".green
|
28
29
|
system("yjcocoa git tag --add=#{tag}")
|
29
|
-
|
30
|
+
else
|
30
31
|
Dir.chdir("..") {
|
31
32
|
self.run
|
32
33
|
}
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
37
|
+
def current_branch
|
38
|
+
list = (`git branch`).split("\n")
|
39
|
+
for item in list
|
40
|
+
if item =~ /\* /
|
41
|
+
return item.gsub(/\* /, "")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
36
46
|
end
|
37
47
|
|
38
48
|
end
|
data/lib/yjcocoa/test.rb
CHANGED
@@ -1 +1,14 @@
|
|
1
|
-
|
1
|
+
def current_branch
|
2
|
+
list = (`git branch`).split("\n")
|
3
|
+
for item in list
|
4
|
+
if item =~ /\* /
|
5
|
+
return item.gsub(/\* /, "")
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
unless current_branch =~ /master/
|
11
|
+
puts "current_branch1"
|
12
|
+
end
|
13
|
+
|
14
|
+
puts "current_branch"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yjcocoa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 18.07.
|
4
|
+
version: 18.07.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 阳君
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|