orientepodspecpush 0.3.9 → 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
  SHA256:
3
- metadata.gz: df5099322774a7afbc58be5f2767f7348ca73fe34235a50444106bca7ec34001
4
- data.tar.gz: e07b1fd67b38a773e830e46a0d64ceaecce0e7d794d9c9321607982d1bef0710
3
+ metadata.gz: db3f05b8673a6447d1919b4d17ecb87213e1422df8e2930b3491637de45b4a59
4
+ data.tar.gz: 00f63273d7223156abdc044cadca304468608d30f0bd0bc65438194c19fcf32a
5
5
  SHA512:
6
- metadata.gz: 67444ac9352f505d03a2da8e4b8a7cb13e67459f6d7b5359b4bb215ca737b2c2e1833fa7e6475202b4dd53ba328b6b0b740a427a79425022844a3cba7def1369
7
- data.tar.gz: 19447c5582f2eebc331a52c8da2103eaf7b71f5b6e5fe1378953870459daeaa635c0ee352a249aa2aebb5edd1e8310e70d1f85f3466fb8e8f3bea308d7f009e2
6
+ metadata.gz: 02070fbd045b58b7a745aae96e9ec31f8a07c7389716e43966873932c173426ca7cb119181099f8f4e057cf4045d15a62fb9ee444dba126734e2002c9af63bad
7
+ data.tar.gz: 425c131daf24d0eae63f25aa24c21bec208be3958cf999d5350a60ea287bea1b8e35664e87e08a351a24eab0bfbf163d7c33d1a569bb9e3c5ab7ea49c9372415
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Orientepodspecpush
2
- VERSION = "0.3.9"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orientepodspecpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John wang