sjpush 0.0.7 → 0.0.8
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/lib/sjpush.rb +32 -14
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a57927d6cb2608a9a10693bae413c6e5f0929340988c4e0115ab425c708b28da
|
|
4
|
+
data.tar.gz: '0148f1aacb820624a783dd5622b40240fd19f764d7df8a1729bb8accb75519e6'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4913e10cf41fb859cde03a14286c9c03f380f5ef43f857b68224537dbc7932a22cb9f7b039dfe02979e815e4fcc58d7d68828a4e8c5e997f556a94a37eec2cdb
|
|
7
|
+
data.tar.gz: 2780a0cd4b6fc903c66019c94dac9015c6844f260435fce665f42fa3bd8e8a8e7a9b6332c94c532ebd13de89f7bd56c997c7ca0eca80ff1edda95815f8a6ca7b
|
data/lib/sjpush.rb
CHANGED
|
@@ -17,13 +17,19 @@ class ActionHandler
|
|
|
17
17
|
Dir["*.podspec"].last
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def
|
|
20
|
+
def searchPodspec()
|
|
21
21
|
s = ActionHandler.getPodspec()
|
|
22
22
|
if s.nil?
|
|
23
23
|
puts "\n已退出, 未搜索到 podspec 文件"
|
|
24
24
|
exit
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
return s
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def updatePodspecVerAction()
|
|
31
|
+
s = searchPodspec()
|
|
32
|
+
|
|
27
33
|
contents = String.new
|
|
28
34
|
File.new(s, "r").each_line do |line|
|
|
29
35
|
regex = "s.version([^']+)'([^']+)'*"
|
|
@@ -43,21 +49,31 @@ class ActionHandler
|
|
|
43
49
|
end
|
|
44
50
|
|
|
45
51
|
def getPodspecVersion()
|
|
46
|
-
s =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
s = searchPodspec()
|
|
53
|
+
|
|
54
|
+
File.new(s, "r").each_line do |line|
|
|
55
|
+
regex = "s.version(?:[^']+)'([^']+)'*"
|
|
56
|
+
if /#{regex}/ =~ line
|
|
57
|
+
@version = $1.to_i
|
|
58
|
+
break
|
|
59
|
+
end
|
|
50
60
|
end
|
|
51
61
|
|
|
62
|
+
return @version
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def getPodspecName()
|
|
66
|
+
s = searchPodspec()
|
|
67
|
+
|
|
52
68
|
File.new(s, "r").each_line do |line|
|
|
53
|
-
regex = "s.
|
|
69
|
+
regex = "s.name(?:[^']+)'([^']+)'*"
|
|
54
70
|
if /#{regex}/ =~ line
|
|
55
|
-
@
|
|
71
|
+
@name = $1
|
|
56
72
|
break
|
|
57
73
|
end
|
|
58
74
|
end
|
|
59
75
|
|
|
60
|
-
return @
|
|
76
|
+
return @name
|
|
61
77
|
end
|
|
62
78
|
end
|
|
63
79
|
|
|
@@ -111,10 +127,12 @@ class ActionHandler
|
|
|
111
127
|
end
|
|
112
128
|
|
|
113
129
|
def addNewTagForPodspecVersionAction()
|
|
114
|
-
version = ActionHandler.getPodspecVersion()
|
|
115
130
|
submit = getSubmitInfo()
|
|
116
|
-
|
|
117
|
-
|
|
131
|
+
version = ActionHandler.getPodspecVersion()
|
|
132
|
+
name = ActionHandler.getPodspecName()
|
|
133
|
+
tag = "#{name}-#{version}"
|
|
134
|
+
addCommand "git tag -a '#{tag}' -m '#{submit}'"
|
|
135
|
+
addCommand "git push origin #{tag}"
|
|
118
136
|
end
|
|
119
137
|
|
|
120
138
|
def deleteTagAction()
|
|
@@ -125,14 +143,14 @@ class ActionHandler
|
|
|
125
143
|
end
|
|
126
144
|
|
|
127
145
|
def podReleaseAction()
|
|
128
|
-
|
|
129
|
-
if
|
|
146
|
+
spec = ActionHandler.getPodspec()
|
|
147
|
+
if spec.nil?
|
|
130
148
|
puts "\n已退出, 未搜索到 podspec 文件"
|
|
131
149
|
exit
|
|
132
150
|
end
|
|
133
151
|
|
|
134
152
|
repo = getCocoapodsRepo()
|
|
135
|
-
addCommand "pod repo push #{repo} #{
|
|
153
|
+
addCommand "pod repo push #{repo} #{spec} --allow-warnings --use-libraries"
|
|
136
154
|
end
|
|
137
155
|
|
|
138
156
|
def executeCommands
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sjpush
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SanJiang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: 用于辅助git提交
|
|
14
14
|
email:
|