reissue 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7a30f436a8c3bdf476c8ef3a7547536e292b3b81cf207ff8efe92404eacf2e9
4
- data.tar.gz: 20d5e0d023af7778e0de3d71859088b5baa216bc00c7ef09a46732e1dcc0712a
3
+ metadata.gz: b279a283d58ba13af326acf3eec52c805deffd80bfc0cd6e4e9a7d320cc9dd0f
4
+ data.tar.gz: 4394e68a43bb33c0068fcb9869dac6bfa4f1a27bdd890afe2e65d3cdd2fe1cd6
5
5
  SHA512:
6
- metadata.gz: fea5c4c4d7c7c4d7abcd43d038e9566de875892ee2cda0e95730f69c4108fd3a0304f99ec5ab3bcdd17b104719280b7610061973217eb9fc1277d265cb017238
7
- data.tar.gz: 24a0fcfb969d6ba3640e3594a268cd192aa5b7316b49e88aa7059f918bfdb9fb0728aaf81df11cd3a61950ffea47af6c30d07725c12c6bdeac5ff742f08991e9
6
+ metadata.gz: 7d1d3335bf01a5563b93cf3dd4ba030f2e851a5a5cbbbfd23d38e9fdcda21634fa4cd0fb6cfe3fd9ba0b56bf55f3ab744116d77b38dadbda98844676dccd9a88
7
+ data.tar.gz: 3ece0d9ecfe89e38c0dfef00304acaf1502760a7e9c3759f380d18b9698e2f1233e8cc2716d0c1184a00a11f5c7c457e4d386adf63dbabcd70ec0fb43f001eb4
data/CHANGELOG.md CHANGED
@@ -5,24 +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.2.2] - 2024-09-06
8
+ ## [0.3.0] - 2024-09-06
9
9
 
10
10
  ### Added
11
11
 
12
- - Add a `reissue:branch` task to create a new branch for the next version
13
- - Add a `reissue:push` task to push the new branch to the remote repository
14
-
15
- ### Fixed
16
-
17
- - Require the 'date' library in tests to ensure the Date constant is present
18
- - Ensure that `updated_paths` are always enumerable
19
-
20
- ## [0.2.1] - 2024-07-29
21
-
22
- ### Added
23
-
24
- - Release notes and the checksum for the 0.2.0 version
12
+ - Add `push_reissue` option to control pushing changes to the remote repository.
25
13
 
26
14
  ### Changed
27
15
 
28
- - Return the new version from the reissue task
16
+ - Default behavior of _this_ gem's release is to push finalize without a branch.
17
+
18
+ ## [0.2.3] - Unreleased
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 = :branch
19
+ task.push_finalize = true
20
20
  end
data/lib/reissue/rake.rb CHANGED
@@ -52,6 +52,14 @@ module Reissue
52
52
  # Set this to :branch to push to a new branch.
53
53
  attr_accessor :push_finalize
54
54
 
55
+ # Whether to push the changes when a new version is created. Default: :branch.
56
+ # Requires commit to be true.
57
+ #
58
+ # Set this to false to disable pushing.
59
+ # Set this to true to push to the current branch.
60
+ # Set this to :branch to push to a new branch.
61
+ attr_accessor :push_reissue
62
+
55
63
  def initialize(name = :reissue)
56
64
  @name = name
57
65
  @description = "Prepare the code for work on a new version."
@@ -63,6 +71,7 @@ module Reissue
63
71
  @push_finalize = false
64
72
  @version_limit = 2
65
73
  @version_redo_proc = nil
74
+ @push_reissue = :branch
66
75
  end
67
76
 
68
77
  def finalize_with_branch?
@@ -73,6 +82,14 @@ module Reissue
73
82
  !!push_finalize
74
83
  end
75
84
 
85
+ def reissue_version_with_branch?
86
+ push_reissue == :branch
87
+ end
88
+
89
+ def push_reissue?
90
+ !!push_reissue
91
+ end
92
+
76
93
  def define
77
94
  desc description
78
95
  task name, [:segment] do |task, args|
@@ -91,7 +108,11 @@ module Reissue
91
108
 
92
109
  bump_message = "Bump version to #{new_version}"
93
110
  if commit
111
+ if reissue_version_with_branch?
112
+ Rake::Task["#{name}:branch"].invoke("reissue/#{new_version}")
113
+ end
94
114
  system("git commit -m '#{bump_message}'")
115
+ Rake::Task["#{name}:push"].invoke if push_reissue?
95
116
  else
96
117
  system("echo '#{bump_message}'")
97
118
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reissue
4
- VERSION = "0.2.2"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reissue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay