structured_changelog 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/README.md +23 -11
- data/lib/structured_changelog/release.rb +5 -1
- data/lib/structured_changelog/roadmap.rb +17 -3
- data/lib/structured_changelog.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d62c6e49c9b39e054dcf91503691a586b8a29215
|
4
|
+
data.tar.gz: 06ef5d163ed5f36450182dd266dc211371e01c24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca72358aaabf311f18b8f6e24dead1bb049f4b0dfe235186965c9c1e679ed4cae8bf3cde16f8a1fba8141eb4ea94684d631cf12b8447de36ca63b8197237b46a
|
7
|
+
data.tar.gz: 127e75076921602f0225b2693b72fb873250569b301a2408571302f44c72bb0a40f72a0acc164dfb1ac0ea4e05083d40d6675b0a7c469afd88caca9c5b39fe4f
|
data/CHANGELOG.md
CHANGED
@@ -1,10 +1,21 @@
|
|
1
|
+
## ROADMAP 1.1.0
|
2
|
+
|
3
|
+
* investigate partial parsing of a file if parsing slows down *too much* on large changelogs
|
4
|
+
|
1
5
|
## ROADMAP 1.0.0
|
2
6
|
|
7
|
+
* consider moving from BREAKING/FEATURE/FIX to MAJOR/MINOR/PATCH
|
3
8
|
* validate that each line starts with BREAKING:/FEATURE:/FIX:
|
4
9
|
* validate that each release has the appropriate version
|
5
10
|
* validate that release numbers increase monotonically
|
6
|
-
* support variant versions (rc1, pre, alpha, etc..)
|
7
11
|
* centralize the version regex (if possible)
|
12
|
+
* require release block lines to be ordered in descending severity
|
13
|
+
* disable strict semver version validation before 1.0.0
|
14
|
+
|
15
|
+
## RELEASE 0.6.0
|
16
|
+
|
17
|
+
* FEATURE: variant versions (rc1, pre, alpha, etc..) are supported
|
18
|
+
* FEATURE: non-numbered roadmap versions (for un-released but immediate work) are now supported
|
8
19
|
|
9
20
|
## RELEASE 0.5.0
|
10
21
|
|
data/README.md
CHANGED
@@ -10,38 +10,50 @@ require 'structured_changelog'
|
|
10
10
|
MyProject::VERSION = StructuredChangeog.new("path/to/CHANGELOG.md").version
|
11
11
|
```
|
12
12
|
|
13
|
-
|
13
|
+
If you use `rake release` to release new code, & want changelog validation to be a part of that release task, you can add this to your `Rakefile`:
|
14
14
|
|
15
15
|
```ruby
|
16
16
|
require 'structured_changelog/tasks'
|
17
17
|
```
|
18
18
|
|
19
|
-
|
19
|
+
(This will execute code that injects the `changelog:validate` task into the list of tasks `rake release` runs before performing a release.)
|
20
|
+
|
21
|
+
You'll also get these other wonderful rake tasks:
|
22
|
+
|
23
|
+
## Wonderful Rake Tasks
|
20
24
|
|
21
25
|
To validate your changelog:
|
22
26
|
|
23
|
-
$
|
27
|
+
$ rake changelog:validate
|
28
|
+
|
29
|
+
To determine what version you're on:
|
30
|
+
|
31
|
+
$ rake changelog:version
|
32
|
+
|
33
|
+
To view the release notes of the current release:
|
34
|
+
|
35
|
+
$ rake changelog:notes
|
36
|
+
$ rake changelog:notes[current]
|
24
37
|
|
25
|
-
To view
|
38
|
+
To view the release notes of every release:
|
26
39
|
|
27
|
-
$
|
28
|
-
$ bundle exec rake changelog:notes[ALL]
|
40
|
+
$ rake changelog:notes[all]
|
29
41
|
|
30
42
|
for a specific release:
|
31
43
|
|
32
|
-
$
|
44
|
+
$ rake changelog:notes[1.0.4]
|
33
45
|
|
34
46
|
for all releases inclusively after a given release:
|
35
47
|
|
36
|
-
$
|
37
|
-
|
48
|
+
$ rake changelog:notes[1.0.4<]
|
49
|
+
|
38
50
|
for all releases inclusively before a given release:
|
39
51
|
|
40
|
-
$
|
52
|
+
$ rake changelog:notes[<2.0.4]
|
41
53
|
|
42
54
|
for all releases inclusively between two releases:
|
43
55
|
|
44
|
-
$
|
56
|
+
$ rake changelog:notes[1.0.4<2.0.4]
|
45
57
|
|
46
58
|
## Installation
|
47
59
|
|
@@ -1,7 +1,15 @@
|
|
1
1
|
class StructuredChangelog
|
2
2
|
class Roadmap
|
3
|
-
def self.
|
4
|
-
|
3
|
+
def self.start_with?(line)
|
4
|
+
patterns.any? { |pattern| line =~ pattern }
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.patterns
|
8
|
+
[
|
9
|
+
/^## ROADMAP (?<version>\S+)$/,
|
10
|
+
/^## ROADMAP/,
|
11
|
+
/^## NEXT RELEASE/,
|
12
|
+
]
|
5
13
|
end
|
6
14
|
|
7
15
|
def <=>(roadmap)
|
@@ -13,7 +21,13 @@ class StructuredChangelog
|
|
13
21
|
end
|
14
22
|
|
15
23
|
def version
|
16
|
-
|
24
|
+
self.class.patterns.each do |pattern|
|
25
|
+
match = contents.match(pattern)
|
26
|
+
|
27
|
+
return match[:version] if match && match.names.include?('version')
|
28
|
+
end
|
29
|
+
|
30
|
+
nil
|
17
31
|
end
|
18
32
|
|
19
33
|
private
|
data/lib/structured_changelog.rb
CHANGED
@@ -49,11 +49,11 @@ class StructuredChangelog
|
|
49
49
|
capture = []
|
50
50
|
|
51
51
|
[*path.readlines, :EOF].each do |line|
|
52
|
-
if line == :EOF ||
|
53
|
-
if capture.first
|
52
|
+
if line == :EOF || Roadmap.start_with?(line) || Release.start_with?(line)
|
53
|
+
if Roadmap.start_with?(capture.first)
|
54
54
|
roadmaps << Roadmap.new(capture.join)
|
55
55
|
capture = []
|
56
|
-
elsif capture.first
|
56
|
+
elsif Release.start_with?(capture.first)
|
57
57
|
releases << Release.new(capture.join)
|
58
58
|
capture = []
|
59
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structured_changelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hoffman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|