releasinator 0.7.3 → 0.7.4

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
  SHA1:
3
- metadata.gz: dc7ca397ac171e6e7f94da6204f60e42424d4e1e
4
- data.tar.gz: 967d9bac804daa9d9a6090aa90212c74fe15fc35
3
+ metadata.gz: 015abca9bbd49c8b77ab88cb4f5b8215f5c9dd91
4
+ data.tar.gz: 5869bd2001da0953bc963ba9c2f7e130a27e4d08
5
5
  SHA512:
6
- metadata.gz: 04577f4337061b7cdfcb64383e8d2cc1136917519c155f69ff2485a25ca4bce2449a630e4aed7bba3c8cac3d506ef746a6d12d52ac636323dc69c1bdbf7070eb
7
- data.tar.gz: ce559e15225fa3e9d41c153b733bf7d7b8e65a8d8ca959d6cc17ee4dcaa81f05b7800a742eb8edf09e4f4e52f8b3ab9439546cf8adf237809dfe68e1ba02e4c9
6
+ metadata.gz: 60c1097986f71a53297a7988d4c4bd05054a8411278a9a5c614627d0f026810b2aab88dea97453142e10e9a255a27394319b8ae1003266c625fdf08e71d3c8ff
7
+ data.tar.gz: 444ac151b43735e96c95031d5a2b725902b5e5d3f85a135035a0071a7bd7ab30c7505bbf520f470deb3572f5419c2f774bf81f9a52b222fc56127d93bb12576b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Releasinator release notes
2
2
  ==========================
3
3
 
4
+ 0.7.4
5
+ -----
6
+ * Fix tagged version parsing to support getting the raw tag value.
7
+
4
8
  0.7.3
5
9
  -----
6
10
  * Fix changelog parsing regex to support "vX.Y.Z" version names.
data/lib/git_util.rb CHANGED
@@ -164,18 +164,18 @@ module Releasinator
164
164
  end
165
165
  end
166
166
 
167
- def self.tagged_versions(remote=false)
167
+ def self.tagged_versions(remote=false, raw_tags=false)
168
168
  version_reg = Semantic::Version::SemVerRegexp
169
169
  tags = self.tags(remote)
170
170
 
171
- tags.map { |tag|
172
- if tag.start_with? "v"
171
+ tags.select { |tag|
172
+ tag = tag[1..tag.size] if tag.start_with? "v"
173
+ tag =~ version_reg
174
+ }.map { |tag|
175
+ if !raw_tags and tag.start_with? "v"
173
176
  tag = tag[1..tag.size]
174
177
  end
175
-
176
- if tag =~ version_reg
177
- tag
178
- end
178
+ tag
179
179
  }.compact
180
180
  end
181
181
 
@@ -1,3 +1,3 @@
1
1
  module Releasinator
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
@@ -174,13 +174,12 @@ end
174
174
 
175
175
  desc "release all"
176
176
  task :release => [:"validate:all"] do
177
- last_tag = GitUtil.tagged_versions(true).last
177
+ last_tag = GitUtil.tagged_versions(remote=true, raw_tags=true).last
178
178
 
179
179
  if !last_tag.nil? # If last tag is nil, at this point, there must be changelog entry, but this is the first releasinator release, proceed.
180
- last_tag = Semantic::Version.new(last_tag)
181
180
  commits_since_tag = GitUtil.commits(last_tag)
182
181
  if commits_since_tag.size > 0 # There are new commits to be released
183
- if @current_release.version > last_tag # CHANGELOG.md version is ahead of last tag. The releaser has already updated the changelog, and we've valdidated it
182
+ if @current_release.version > Semantic::Version.new(last_tag) # CHANGELOG.md version is ahead of last tag. The releaser has already updated the changelog, and we've validated it
184
183
  if !Printer.ask_binary("The version from CHANGELOG.md '#{@current_release.version}' is greater than the last tagged version '#{last_tag}'. Have you already updated your version and CHANGELOG.md?")
185
184
  Printer.fail("Update your version and CHANGELOG.md and re-run rake release.")
186
185
  abort()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releasinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PayPal