reissue 0.3.2 → 0.4.0
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 +9 -9
- data/Rakefile +1 -1
- data/lib/reissue/rake.rb +4 -1
- data/lib/reissue/version.rb +1 -1
- data/lib/reissue.rb +32 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ec9aad4eae0a3eaf769c1ae42cc58ca21ad704ff0b82697782fc882600902e7
|
4
|
+
data.tar.gz: d98907cd5df4104320b6793caafe4d33333be534c253172b7b6bb7090ff2504e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16072744735112068c9b5a4475d2d6d917fad5ffa82772ea59989380f85672a32fe4c6b226cb8db00eef74b7dd1bf328c23f4f60cef42228eb79058cb3f29568
|
7
|
+
data.tar.gz: 5554eec13624f10d14bc59fd2b2428f7a1e5803d3a0af15c90810d62490dc8875eba2d57eb8966ec88dd900607dc14c83ae967dba9fb2f658c1e0d3df05724b3
|
data/CHANGELOG.md
CHANGED
@@ -5,20 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7
7
|
|
8
|
-
## [0.
|
8
|
+
## [0.4.0] - 2025-05-08
|
9
9
|
|
10
|
-
###
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
- Update reformat task to create a new changelog if it doesn't exist
|
11
13
|
|
12
|
-
|
14
|
+
## [0.3.4] - Unreleased
|
13
15
|
|
14
|
-
## [0.3.
|
16
|
+
## [0.3.3] - 2025-01-17
|
15
17
|
|
16
18
|
### Added
|
17
19
|
|
18
|
-
-
|
20
|
+
- CODEOWNERS file
|
19
21
|
|
20
|
-
###
|
22
|
+
### Fixed
|
21
23
|
|
22
|
-
-
|
23
|
-
- Inject the constants in the `create` method.
|
24
|
-
- Updated the tested Ruby version to 3.4.
|
24
|
+
- Properly retain changelog on `reissue:finalize`
|
data/Rakefile
CHANGED
data/lib/reissue/rake.rb
CHANGED
@@ -142,13 +142,16 @@ module Reissue
|
|
142
142
|
else
|
143
143
|
args[:version_limit].to_i
|
144
144
|
end
|
145
|
+
unless File.exist?(changelog_file)
|
146
|
+
formatter.generate_changelog(changelog_file)
|
147
|
+
end
|
145
148
|
formatter.reformat(changelog_file, version_limit:, retain_changelogs:)
|
146
149
|
end
|
147
150
|
|
148
151
|
desc "Finalize the changelog for an unreleased version to set the release date."
|
149
152
|
task "#{name}:finalize", [:date] do |task, args|
|
150
153
|
date = args[:date] || Time.now.strftime("%Y-%m-%d")
|
151
|
-
version, date = formatter.finalize(date, changelog_file:)
|
154
|
+
version, date = formatter.finalize(date, changelog_file:, retain_changelogs:)
|
152
155
|
finalize_message = "Finalize the changelog for version #{version} on #{date}"
|
153
156
|
if commit_finalize
|
154
157
|
tasker["#{name}:branch"].invoke("reissue/#{version}") if finalize_with_branch?
|
data/lib/reissue/version.rb
CHANGED
data/lib/reissue.rb
CHANGED
@@ -41,9 +41,9 @@ module Reissue
|
|
41
41
|
# @param changelog_file [String] The path to the changelog file.
|
42
42
|
#
|
43
43
|
# @return [Array] The version number and release date.
|
44
|
-
def self.finalize(date = Date.today, changelog_file: "CHANGELOG.md")
|
44
|
+
def self.finalize(date = Date.today, changelog_file: "CHANGELOG.md", retain_changelogs: false)
|
45
45
|
changelog_updater = ChangelogUpdater.new(changelog_file)
|
46
|
-
changelog = changelog_updater.finalize(date:, changelog_file:)
|
46
|
+
changelog = changelog_updater.finalize(date:, changelog_file:, retain_changelogs:)
|
47
47
|
changelog["versions"].first.slice("version", "date").values
|
48
48
|
end
|
49
49
|
|
@@ -56,4 +56,34 @@ module Reissue
|
|
56
56
|
changelog_updater = ChangelogUpdater.new(file)
|
57
57
|
changelog_updater.reformat(version_limit:, retain_changelogs:)
|
58
58
|
end
|
59
|
+
|
60
|
+
INITIAL_CHANGES = {
|
61
|
+
"Added" => ["Initial release"]
|
62
|
+
}
|
63
|
+
|
64
|
+
def self.generate_changelog(location, changes: {})
|
65
|
+
template = <<~EOF
|
66
|
+
# Changelog
|
67
|
+
|
68
|
+
All notable changes to this project will be documented in this file.
|
69
|
+
|
70
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
71
|
+
and this project adheres to [Semantic Versioning](http://semver.org/).
|
72
|
+
|
73
|
+
## Unreleased
|
74
|
+
|
75
|
+
## [0.1.0]
|
76
|
+
EOF
|
77
|
+
|
78
|
+
File.write(location, template)
|
79
|
+
changelog_updater = ChangelogUpdater.new(location)
|
80
|
+
changelog_updater.call(
|
81
|
+
"0.1.0",
|
82
|
+
date: "Unreleased",
|
83
|
+
changes: changes.empty? ? INITIAL_CHANGES : changes,
|
84
|
+
changelog_file: location,
|
85
|
+
version_limit: 1,
|
86
|
+
retain_changelogs: false
|
87
|
+
)
|
88
|
+
end
|
59
89
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reissue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Gay
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rake
|
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '0'
|
65
65
|
requirements: []
|
66
|
-
rubygems_version: 3.6.
|
66
|
+
rubygems_version: 3.6.7
|
67
67
|
specification_version: 4
|
68
68
|
summary: Keep your versions and changelogs up to date and prepared for release.
|
69
69
|
test_files: []
|