reissue 0.3.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5dba48c0385224669c8a69c5c660d6517a4cbd1fd567e81d8f3865db22c0d9c
4
- data.tar.gz: fe1dc9b6633ead5fa21279ea7b43f67f394d36543452da65d811e12ba9ff7523
3
+ metadata.gz: 9ec9aad4eae0a3eaf769c1ae42cc58ca21ad704ff0b82697782fc882600902e7
4
+ data.tar.gz: d98907cd5df4104320b6793caafe4d33333be534c253172b7b6bb7090ff2504e
5
5
  SHA512:
6
- metadata.gz: 602db215d03fc43201417a833ca54d415293d947fd78c2ca36b94c698fcdc634c895b1a92b2c66fa7e274a738fb68dd3cd4b75d6d8ed342af5ff5ec6018b1e6d
7
- data.tar.gz: ac01da29894ea7f2760e2b0e678d8b449c98aac52f30863f068709910732d306b506f40fb067597f9fd752a96eae610c0064ce1fd12f09d2b51a80f776bf16ce
6
+ metadata.gz: 16072744735112068c9b5a4475d2d6d917fad5ffa82772ea59989380f85672a32fe4c6b226cb8db00eef74b7dd1bf328c23f4f60cef42228eb79058cb3f29568
7
+ data.tar.gz: 5554eec13624f10d14bc59fd2b2428f7a1e5803d3a0af15c90810d62490dc8875eba2d57eb8966ec88dd900607dc14c83ae967dba9fb2f658c1e0d3df05724b3
data/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ 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.4.0] - 2025-05-08
9
+
10
+ ### Changed
11
+
12
+ - Update reformat task to create a new changelog if it doesn't exist
13
+
14
+ ## [0.3.4] - Unreleased
15
+
8
16
  ## [0.3.3] - 2025-01-17
9
17
 
10
18
  ### Added
@@ -14,9 +22,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
14
22
  ### Fixed
15
23
 
16
24
  - Properly retain changelog on `reissue:finalize`
17
-
18
- ## [0.3.2] - 2025-01-16
19
-
20
- ### Fixed
21
-
22
- - Parser will handle nil changes
data/Rakefile CHANGED
@@ -16,5 +16,5 @@ require_relative "lib/reissue/gem"
16
16
 
17
17
  Reissue::Task.create :reissue do |task|
18
18
  task.version_file = "lib/reissue/version.rb"
19
- task.push_finalize = true
19
+ task.push_finalize = :branch
20
20
  end
data/lib/reissue/rake.rb CHANGED
@@ -142,6 +142,9 @@ 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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reissue
4
- VERSION = "0.3.3"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/reissue.rb CHANGED
@@ -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,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reissue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-01-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -50,7 +49,6 @@ metadata:
50
49
  homepage_uri: https://github.com/SOFware/reissue
51
50
  source_code_uri: https://github.com/SOFware/reissue
52
51
  changelog_uri: https://github.com/SOFware/reissue/blob/main/CHANGELOG.md
53
- post_install_message:
54
52
  rdoc_options: []
55
53
  require_paths:
56
54
  - lib
@@ -65,8 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
63
  - !ruby/object:Gem::Version
66
64
  version: '0'
67
65
  requirements: []
68
- rubygems_version: 3.5.9
69
- signing_key:
66
+ rubygems_version: 3.6.7
70
67
  specification_version: 4
71
68
  summary: Keep your versions and changelogs up to date and prepared for release.
72
69
  test_files: []