orientepodspecpush 0.2.9 → 0.3.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: b816e466e1409cf742c4e36856fd65a0e1676aac7bf53fec228fa3e4a64fde7e
4
- data.tar.gz: cde6d65974f23244843f910ea946862ea81ba4188fcd9467db8e916a2a25f21b
3
+ metadata.gz: 23950223ac0cd2ef03664b1ebaed4f481a9f18fa0f75f908da7532f8d493ce6c
4
+ data.tar.gz: b170454ee1132bdbdca93dbccbdd24f25b53309631033416b3a910265ce9e5df
5
5
  SHA512:
6
- metadata.gz: 5a0c0e8420aa7bc66a63b726971ef70377405a335407c5528086be7da3dfdddc7457cc4805d50a6a43d23df4b0e484761f38838e65834856633b30b2ab49116a
7
- data.tar.gz: 73d1afcd64d5e802744d86060cb811f4eec13835a855ee89423694312517e4dde5af61441eb483ed78e24a46854b84d4ec93baa4e7186443c84892e58171e9f8
6
+ metadata.gz: 2325cbb186618b628fec5ce4832d4ae6655511c01a0870a52097205cc72bd12fff4ac9a710a7e9479d8e1cedc0afed559f3170f4e4842e4571db145ae8c8130a
7
+ data.tar.gz: a90c298de7b474f44562632a689c49f4ab692149b174b6462d66e2349dd6cc9d43729e1a73b10206cdafba33daddf830d29bdbe5c5329de0ce5e173b91c84fc2
@@ -100,16 +100,16 @@ module Orientepodspecpush
100
100
  #
101
101
 
102
102
  if opts[:versionCommitMsg] == nil
103
- system "git tag -a #{opts[:version]} -m 'add new tag'"
103
+ system "git tag -a #{opts[:tag]} -m 'add new tag'"
104
104
  else
105
- system "git tag -a #{opts[:version]} -m '#{opts[:versionCommitMsg]}'"
105
+ system "git tag -a #{opts[:tag]} -m '#{opts[:tagCommitMsg]}'"
106
106
  end
107
107
  # system "git tag -a #{@podVersion} -m '#{@podVersionMessage}'"
108
108
  system "git push --tags"
109
109
 
110
110
  contents = File.read(specfile)
111
111
  oldVersion = Regexp.new('[0-9.]{2,6}').match(Regexp.new('(s.version)\s*=.*\n').match(contents).to_s).to_s
112
- File.write(specfile, contents.sub!(oldVersion, opts[:version]))
112
+ File.write(specfile, contents.sub!(oldVersion, opts[:tag]))
113
113
 
114
114
  # cmd = []
115
115
  # cmd << ['bundle exec'] if shouldUseBundleExec
@@ -125,12 +125,12 @@ module Orientepodspecpush
125
125
  # system "git push --tags"
126
126
  end
127
127
 
128
- def rollbackTag
128
+ def rollbackTag(opts)
129
129
  puts "Rolling back git tags".green
130
130
 
131
131
  system "git checkout ."
132
- system "git tag -d #{opts[:version]}"
133
- system "git push -d origin #{opts[:version]}"
132
+ system "git tag -d #{opts[:tag]}"
133
+ system "git push -d origin #{opts[:tag]}"
134
134
  exit
135
135
  end
136
136
 
@@ -146,10 +146,10 @@ module Orientepodspecpush
146
146
  if success == false && withWarnings == false
147
147
  # Try again?
148
148
  puts "Linting failed, try again by allowing warnings? [Y/n]".blue
149
- gets.chomp.downcase == "y" ? executeLint(true,opts) : rollbackTag
149
+ gets.chomp.downcase == "y" ? executeLint(true,opts) : rollbackTag(opts)
150
150
  elsif success == false && withWarnings == true
151
151
  puts "Even with warnings, something is wrong. Look for any errors".red
152
- rollbackTag
152
+ rollbackTag(opts)
153
153
  else
154
154
  unless opts[:noPackage] == true
155
155
  package(opts)
@@ -157,13 +157,13 @@ module Orientepodspecpush
157
157
  end
158
158
  end
159
159
 
160
- def executePush
160
+ def executePush(opts)
161
161
  puts "Executing: #{@pushCmd}".green
162
162
  success = system @pushCmd
163
163
 
164
164
  if success == false
165
165
  puts "Push failed, see errors.".red
166
- rollbackTag
166
+ rollbackTag(opts)
167
167
  end
168
168
  end
169
169
 
@@ -214,7 +214,7 @@ module Orientepodspecpush
214
214
 
215
215
  # execute
216
216
  executeLint(true,opts)
217
- executePush
217
+ executePush(opts)
218
218
 
219
219
  # Tidy up this repo!!
220
220
  commitThisRepo
@@ -1,3 +1,3 @@
1
1
  module Orientepodspecpush
2
- VERSION = "0.2.9"
2
+ VERSION = "0.3.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.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John wang