orientepodspecpush 0.3.9 → 0.4.0
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/orientepodspecpush.rb +17 -5
- data/lib/orientepodspecpush/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db3f05b8673a6447d1919b4d17ecb87213e1422df8e2930b3491637de45b4a59
|
4
|
+
data.tar.gz: 00f63273d7223156abdc044cadca304468608d30f0bd0bc65438194c19fcf32a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02070fbd045b58b7a745aae96e9ec31f8a07c7389716e43966873932c173426ca7cb119181099f8f4e057cf4045d15a62fb9ee444dba126734e2002c9af63bad
|
7
|
+
data.tar.gz: 425c131daf24d0eae63f25aa24c21bec208be3958cf999d5350a60ea287bea1b8e35664e87e08a351a24eab0bfbf163d7c33d1a569bb9e3c5ab7ea49c9372415
|
data/lib/orientepodspecpush.rb
CHANGED
@@ -177,7 +177,7 @@ module Orientepodspecpush
|
|
177
177
|
flag = system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
|
178
178
|
end
|
179
179
|
if flag == false
|
180
|
-
puts "tag 已经存在"
|
180
|
+
puts "tag 已经存在".red
|
181
181
|
exit
|
182
182
|
end
|
183
183
|
|
@@ -185,14 +185,26 @@ module Orientepodspecpush
|
|
185
185
|
flag = system "git push --tags"
|
186
186
|
if flag == false
|
187
187
|
system "git tag -d #{@podVersion}"
|
188
|
-
puts "远程推送tag 失败"
|
188
|
+
puts "远程推送tag 失败".red
|
189
189
|
exit
|
190
190
|
|
191
191
|
end
|
192
192
|
|
193
|
-
contents = File.read(specfile)
|
194
|
-
oldVersion = Regexp.new('[0-9.]{2,8}').match(Regexp.new('(s.version)\s*=.*\n').match(contents).to_s).to_s
|
195
|
-
File.write(specfile, contents.sub!(oldVersion, @podVersion))
|
193
|
+
# contents = File.read(specfile)
|
194
|
+
# oldVersion = Regexp.new('[0-9.]{2,8}').match(Regexp.new('(s.version)\s*=.*\n').match(contents).to_s).to_s
|
195
|
+
# File.write(specfile, contents.sub!(oldVersion, @podVersion))
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
oldVersion = Regexp.new('(.version)\s*=.*\n').match(contents).to_s
|
201
|
+
oldVersionCopy = oldVersion.clone
|
202
|
+
preStr ="'"
|
203
|
+
sufStr ="'"
|
204
|
+
entireStr = preStr + @podVersion + sufStr
|
205
|
+
nVersion = oldVersion.sub!(/'.*'$/, "#{entireStr}")
|
206
|
+
|
207
|
+
File.write(specfile, contents.sub!(oldVersionCopy, nVersion))
|
196
208
|
|
197
209
|
# cmd = []
|
198
210
|
# cmd << ['bundle exec'] if shouldUseBundleExec
|