Skip to content

Commit

Permalink
Bump version to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Sep 6, 2024
1 parent 4236656 commit aeb70ab
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 15 deletions.
14 changes: 2 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.2.3] - Unreleased

## [0.2.2] - 2024-09-06

### Added
## [0.3.0] - Unreleased

- Add a `reissue:branch` task to create a new branch for the next version
- Add a `reissue:push` task to push the new branch to the remote repository

### Fixed

- Require the 'date' library in tests to ensure the Date constant is present
- Ensure that `updated_paths` are always enumerable
## [0.2.3] - Unreleased
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
reissue (0.2.3)
reissue (0.3.0)
rake

GEM
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ require_relative "lib/reissue/gem"

Reissue::Task.create :reissue do |task|
task.version_file = "lib/reissue/version.rb"
task.push_finalize = :branch
task.push_finalize = true
end
21 changes: 21 additions & 0 deletions lib/reissue/rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ def updated_paths
# Set this to :branch to push to a new branch.
attr_accessor :push_finalize

# Whether to push the changes when a new version is created. Default: :branch.
# Requires commit to be true.
#
# Set this to false to disable pushing.
# Set this to true to push to the current branch.
# Set this to :branch to push to a new branch.
attr_accessor :push_reissue

def initialize(name = :reissue)
@name = name
@description = "Prepare the code for work on a new version."
Expand All @@ -63,6 +71,7 @@ def initialize(name = :reissue)
@push_finalize = false
@version_limit = 2
@version_redo_proc = nil
@push_reissue = :branch
end

def finalize_with_branch?
Expand All @@ -73,6 +82,14 @@ def push_finalize?
!!push_finalize
end

def reissue_version_with_branch?
push_reissue == :branch
end

def push_reissue?
!!push_reissue
end

def define
desc description
task name, [:segment] do |task, args|
Expand All @@ -91,7 +108,11 @@ def define

bump_message = "Bump version to #{new_version}"
if commit
if reissue_version_with_branch?
Rake::Task["#{name}:branch"].invoke("reissue/#{new_version}")
end
system("git commit -m '#{bump_message}'")
Rake::Task["#{name}:push"].invoke if push_reissue?
else
system("echo '#{bump_message}'")
end
Expand Down
2 changes: 1 addition & 1 deletion lib/reissue/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Reissue
VERSION = "0.2.3"
VERSION = "0.3.0"
end

0 comments on commit aeb70ab

Please sign in to comment.