structured_changelog 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -6
- data/lib/structured_changelog/tasks/compile.rb +13 -14
- data/lib/structured_changelog/version.rb +1 -1
- 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: b739ec968c42936d856aa3788cf0429a1381f1a4
|
4
|
+
data.tar.gz: 7723700057200b69557b1a8fcfbf6842b3b4d60f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f21e553a2ef385497c4319ac5e5f640c5cadb3e4287e8e21de82e1f71cea7d770ca9afecfc5ed28da237adb0bf79d612f1ae38e1a69fd5f3b3fe24227c385778
|
7
|
+
data.tar.gz: 9c53f76476323d2f51c6fea3eb2562d9109cdf802ebfdb79536b3006dc36e6f4552f4922ba0dbb4c277742d7b2b7533e1fce0b7a97a2325a467fbbf738c1f6b7
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@
|
|
5
5
|
* require release block lines to be ordered in descending severity
|
6
6
|
* disable strict semver version validation before 1.0.0
|
7
7
|
|
8
|
+
## RELEASE 0.10.2
|
9
|
+
|
10
|
+
* ENHANCEMENT: release lines can now be embedded in any commit message body
|
11
|
+
|
8
12
|
## RELEASE 0.10.1
|
9
13
|
|
10
14
|
* FIX: Fixed an issue that resulted in `changelog:compile` pulling in release lines from previous releases
|
data/README.md
CHANGED
@@ -41,22 +41,23 @@ This will:
|
|
41
41
|
|
42
42
|
If you have multiple contributors, and you follow the single-contributor workflow, you'll end up with conflicts every time multiple people go to add a line to the changelog. We have a separate workflow for you.
|
43
43
|
|
44
|
-
When you want to add
|
44
|
+
When you want to add release notes, instead of adding them directly to the changelog, add them to any git commit:
|
45
45
|
|
46
46
|
```
|
47
|
-
|
47
|
+
Describe what I did this commit
|
48
|
+
|
49
|
+
More description goes here
|
48
50
|
|
49
|
-
* FEATURE: we added a new thing
|
50
51
|
* FIX: we fixed a thing that was broken
|
51
52
|
```
|
52
53
|
|
53
|
-
|
54
|
+
Any line in a commit message that starts with `* BREAKING: `, `* FEATURE: `, `* FIX: `, `* ENHANCEMENT: `, or `* DEPRECATION: ` will be included in the release notes for the next version.
|
54
55
|
|
55
56
|
Then, when you're ready to cut a release, run:
|
56
57
|
|
57
58
|
$ rake changelog:compile
|
58
59
|
|
59
|
-
This will pull all the
|
60
|
+
This will pull all the release lines you've written in git commit messages since the last release from the commit log, and create a new release section in your changelog. It will have the minimum version possible given the change types (BREAKING is a major bump, FEATURE is a minor bump, and FIX, ENHANCEMENT, and DEPRECATION are all patch bumps). Once the rake task has written the new section to the changelog, it's often beneficial to give it a look and make sure it's free of typos and any other mistakes. Then, run
|
60
61
|
|
61
62
|
$ rake changelog:release
|
62
63
|
|
@@ -64,7 +65,7 @@ as usual to actually release your gem.
|
|
64
65
|
|
65
66
|
## Viewing Release Notes
|
66
67
|
|
67
|
-
To view the release notes of the current release
|
68
|
+
To view the release notes of the current release:`
|
68
69
|
|
69
70
|
$ rake changelog:notes
|
70
71
|
$ rake changelog:notes[current]
|
@@ -11,32 +11,31 @@ task "changelog:compile", [:repo_path, :changelog_path] do |_task, arguments|
|
|
11
11
|
|
12
12
|
repo = Git.open(repo_path)
|
13
13
|
|
14
|
-
|
15
|
-
message.
|
16
|
-
|
14
|
+
release_notes = repo.log.between("v#{current_version}").
|
15
|
+
map(&:message).
|
16
|
+
flat_map { |message| message.split("\n") }.
|
17
|
+
grep(/^\*\ (BREAKING|FEATURE|ENHANCEMENT|FIX|DEPRECATION)\:/).
|
18
|
+
map(&:strip).
|
19
|
+
join("\n")
|
17
20
|
|
18
|
-
abort("No
|
21
|
+
abort("No release notes since the last release") if release_notes.empty?
|
19
22
|
|
20
|
-
|
21
|
-
message.sub(/^\[CHANGELOG\]\n\n/, "")
|
22
|
-
end.join("\n")
|
23
|
-
|
24
|
-
new_version = if message.match?(/^*\ BREAKING:/)
|
23
|
+
new_version = if release_notes.match?(/^*\ BREAKING:/)
|
25
24
|
current_version.bump_major
|
26
|
-
elsif
|
25
|
+
elsif release_notes.match?(/^*\ FEATURE:/)
|
27
26
|
current_version.bump_minor
|
28
|
-
elsif
|
27
|
+
elsif release_notes.match?(/^*\ FIX:/)
|
29
28
|
current_version.bump_patch
|
30
|
-
elsif
|
29
|
+
elsif release_notes.match?(/^*\ ENHANCEMENT:/)
|
31
30
|
current_version.bump_patch
|
32
|
-
elsif
|
31
|
+
elsif release_notes.match?(/^*\ DEPRECATION:/)
|
33
32
|
current_version.bump_patch
|
34
33
|
end
|
35
34
|
|
36
35
|
changelog_path.write(
|
37
36
|
changelog_path.read.sub(
|
38
37
|
/^##\ RELEASE\ #{current_version}/,
|
39
|
-
"## RELEASE #{new_version}\n\n#{
|
38
|
+
"## RELEASE #{new_version}\n\n#{release_notes}\n\n## RELEASE #{current_version}"
|
40
39
|
)
|
41
40
|
)
|
42
41
|
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.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hoffman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|