releasinator 0.7.1 → 0.7.2

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: 0d03117c03958ef445a45165cebb26d3057540c9
4
- data.tar.gz: b3966ec87539803a9af7c09c2fa9de383f401978
3
+ metadata.gz: 5b20f93a033357d9693f22a79e902f877bb5fb66
4
+ data.tar.gz: 12a453a37c9ab3cff00345b7ceb560978724e514
5
5
  SHA512:
6
- metadata.gz: d52a4168ccdd50b533dbce40c7d709eec5c860fbab99f8c9cf0341c3108c60bb2519a42a945aa3491aa90a25a11cfa5bf481493b594ead8132cc5de139fecd2c
7
- data.tar.gz: d187640b4b97eb2140b535fa0c9fa1e4c0323e7b06ba44f37e347ce0e459d2a3306bc18f07b8036105c712f31cba0299d63260934bf22a44259c34586210a262
6
+ metadata.gz: 1c901d00a7f8f6177b60a7cf0c309f076f978a5ed988820dbe157b9b9c86e4716f05f8e522baa7704cc00e71d449cc1ef0f2427a93a993b284b99863fa57fb15
7
+ data.tar.gz: 45f134a7199df5297dc9b4930bba9c1dc3ac271239a375c3169df3e2e096b81a50cb7f1469fb9ed14534ac2c75d988479fe1d493b2657ea0912d1a54a9d61ffd
@@ -0,0 +1,7 @@
1
+ ### Problem
2
+
3
+ <!-- brief description of issue, bullets are preferred -->
4
+
5
+ ### Solution
6
+
7
+ <!-- brief description of solution, bullets are preferred -->
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Releasinator release notes
2
2
  ==========================
3
3
 
4
+ 0.7.2
5
+ -----
6
+ * Fix changelog parsing regex to support beta/prerelease tags.
7
+
4
8
  0.7.1
5
9
  -----
6
10
  * Prompt user on first release.
@@ -21,6 +21,7 @@ module Releasinator
21
21
 
22
22
  newer_version = nil
23
23
  changelog_hash.each do |key,value|
24
+
24
25
  prefix, version, suffix = key.partition(RELEASE_REGEX)
25
26
  puts "Checking version with prefix:'#{prefix}', version:'#{version}', suffix:'#{suffix}'." if @releasinator_config[:verbose]
26
27
  if prefix != latest_release_prefix
@@ -66,24 +67,10 @@ module Releasinator
66
67
  end
67
68
 
68
69
  def validate_changelog_contents(changelog_contents)
69
- version_header_regexes = [
70
- ## h2 using --- separator. Example:
71
- # 1.0.0
72
- # -----
73
- # First release!
74
- '(^#{RELEASE_REGEX}).*\n----.*',
75
-
76
- # h1/h2 header retrieved from https://github.com/tech-angels/vandamme/#format and modified to skip headers with dots in the name
77
- '^#{0,3} ?([\w\d\.-]+\.[\d\.-]+[a-zA-Z0-9])(?: \W (\w+ \d{1,2}(?:st|nd|rd|th)?,\s\d{4}|\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*'
78
- ]
79
-
80
- changelog_hash = nil
81
- version_header_regexes.each do |version_header_regex|
82
- parser = Vandamme::Parser.new(changelog: changelog_contents, version_header_exp: version_header_regex, format: 'markdown')
83
- changelog_hash = parser.parse
84
-
85
- break if !changelog_hash.empty?
86
- end
70
+ # Modified version of Vandamme::Parser::DEFAULT_REGEX to disallow versions with leading alpha characters
71
+ changelog_regex = Regexp.new('^#{0,3} ?([\d\.-]+\.[\w\d\.-]+[a-zA-Z0-9])(?: \W (\w+ \d{1,2}(?:st|nd|rd|th)?,\s\d{4}|\d{4}-\d{2}-\d{2}|\w+))?\n?[=-]*')
72
+ parser = Vandamme::Parser.new(changelog: changelog_contents, version_header_exp: changelog_regex, format: 'markdown')
73
+ changelog_hash = parser.parse
87
74
 
88
75
  if changelog_hash.empty?
89
76
  Printer.fail("Unable to find any releases in the CHANGELOG.md. Please check that the formatting is correct.")
@@ -1,3 +1,3 @@
1
1
  module Releasinator
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releasinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PayPal
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-29 00:00:00.000000000 Z
11
+ date: 2017-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -158,6 +158,7 @@ extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
160
  - ".github/ISSUE_TEMPLATE.md"
161
+ - ".github/PULL_REQUEST_TEMPLATE.md"
161
162
  - ".gitignore"
162
163
  - ".releasinator.rb"
163
164
  - CHANGELOG.md