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 +4 -4
- data/lib/orientepodspecpush.rb +11 -11
- 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: 23950223ac0cd2ef03664b1ebaed4f481a9f18fa0f75f908da7532f8d493ce6c
|
4
|
+
data.tar.gz: b170454ee1132bdbdca93dbccbdd24f25b53309631033416b3a910265ce9e5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2325cbb186618b628fec5ce4832d4ae6655511c01a0870a52097205cc72bd12fff4ac9a710a7e9479d8e1cedc0afed559f3170f4e4842e4571db145ae8c8130a
|
7
|
+
data.tar.gz: a90c298de7b474f44562632a689c49f4ab692149b174b6462d66e2349dd6cc9d43729e1a73b10206cdafba33daddf830d29bdbe5c5329de0ce5e173b91c84fc2
|
data/lib/orientepodspecpush.rb
CHANGED
@@ -100,16 +100,16 @@ module Orientepodspecpush
|
|
100
100
|
#
|
101
101
|
|
102
102
|
if opts[:versionCommitMsg] == nil
|
103
|
-
system "git tag -a #{opts[:
|
103
|
+
system "git tag -a #{opts[:tag]} -m 'add new tag'"
|
104
104
|
else
|
105
|
-
system "git tag -a #{opts[:
|
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[:
|
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[:
|
133
|
-
system "git push -d origin #{opts[:
|
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
|