release_flow 0.2.0 → 0.2.1
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/lib/release_flow/changelog.rb +3 -2
- data/lib/release_flow/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: ed923d96287e3f32f00b20bb783cb6ebdaa46e60c78397af348d02744b65283a
|
|
4
|
+
data.tar.gz: a8021809a338794139ddf41b1fba7099d175418e63fa181f008cd26312a447ce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9688d07473f50f93c1171a4d45d419825eb15b6583c85d06c147ca73cc897bf66786fa09bc7d340215448bf36a9f5006abaf6d1726c6749b3fc003802cbb1f42
|
|
7
|
+
data.tar.gz: 972f65d6e2222673a0d73043b68b6f9d01d4200f99f373b7de01311da891e414359c013fbfa048b27dbf4aa8785235489f17ae20d10d071d530b85a3f0252424
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.2.1
|
|
6
|
+
|
|
7
|
+
- `prepare` names a project's first release when `CHANGELOG.md` holds only an empty `## [Unreleased]`, instead of crashing with `undefined method 'each_line' for nil`, and the file it writes ends with a single newline.
|
|
8
|
+
|
|
5
9
|
## 0.2.0
|
|
6
10
|
|
|
7
11
|
- A release PR merged on GitHub is shipped by the release workflow: it publishes `v<name>` and merges `main` back into `next`. `init` keeps a workflow already installed, so copy the template's `ship` job into yours, add the production branch to its `pull_request` branches, and add the `base.ref` line to `prepare`'s condition.
|
|
@@ -22,11 +22,12 @@ module ReleaseFlow
|
|
|
22
22
|
raise Error, "CHANGELOG.md has no #{UNRELEASED.strip} section" if rest.nil?
|
|
23
23
|
|
|
24
24
|
body, tail = rest.split(/^(?=## )/, 2)
|
|
25
|
-
sections = fold([body, *fragments])
|
|
25
|
+
sections = fold([body.to_s, *fragments])
|
|
26
26
|
raise Error, "no entries under #{UNRELEASED.strip} or in #{FRAGMENTS}/; there is nothing to release" if sections.empty?
|
|
27
27
|
|
|
28
28
|
released = sections.map { |title, lines| "### #{title}\n\n#{lines.join("\n")}\n" }.join("\n")
|
|
29
|
-
"#{head}#{UNRELEASED}\n## v#{name}\n\n#{released}
|
|
29
|
+
named = "#{head}#{UNRELEASED}\n## v#{name}\n\n#{released}"
|
|
30
|
+
tail.to_s.empty? ? named : "#{named}\n#{tail}"
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
def fragment?(path) = path.match?(%r{\A#{FRAGMENTS}/[^/]+\.md\z}o) && File.basename(path) != "README.md"
|
data/lib/release_flow/version.rb
CHANGED