semantic_release 1.2.0 → 1.3.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: 0a204e59fe728f22a01acf960d9d5d7098499df2bccad1bc49a6c92ea4029d2d
4
- data.tar.gz: 471caaac5e1f4017ce564917554333d2da54aa7860522a700ffe3049e4be3e0d
3
+ metadata.gz: d3f71bfb1b22b3307bf77b825f38245da0a2fdb496a2283a177cce46b4ad06ac
4
+ data.tar.gz: 6d3bc24a2263f8bd9d7f2d473858cd0134bc414e676425fb2b4119f764b89ec7
5
5
  SHA512:
6
- metadata.gz: 6ac502eeddea51f3947de0cba72763db2d51d44a00eb1edec413d79f4501c67696453220aa1914da165bfc78381c390d2dcc40e1578e2d1219f80b2924a74c52
7
- data.tar.gz: 6cfbffd0d594fdc00377f8010f957d292b57866f53117288be79ea63616c7dc660e9d37afad881a90e735e3abc13569776f40e7a4599709268adbdef95abf506
6
+ metadata.gz: b66514f271a7e5fd91203815f754b05c00b390ce71bfc5fac1b2c2e4809661ef8a4db47d035c7c46e77039d588eae90160df703cf2b80a55273be374656968f5
7
+ data.tar.gz: be07bc941cd8ed5ae69a55fdb442a98a04a58553c68c3f69219bac9fc2662f27902767da0576cb7137ab920484837b3e77088043d6033adfc3974834a18eee0e
data/CHANGELOG.md CHANGED
@@ -1,19 +1,29 @@
1
- ## 1.2.0 (06 February 2025)
1
+ ## v1.3.0 (10 February 2025)
2
+
3
+ - feat: Add config option to hide message about building and pushing the .gem file to rubygems.org
4
+ - fix: Prefix version number in changelog files with 'v'
5
+ - ci: Add rake_announcer gem
6
+
7
+ ## v1.2.1 (06 February 2025)
8
+
9
+ - docs: Fix release instructions to clarify that you need to push the tag _and_ run `rake release`
10
+
11
+ ## v1.2.0 (06 February 2025)
2
12
 
3
13
  - feat: Mention 'rake release' in git tag updater output if a gemspec file is present
4
14
  - feat: Stage Gemfile.lock after bumping version.rb if a gemspec file is present
5
15
 
6
- ## 1.1.0 (03 February 2025)
16
+ ## v1.1.0 (03 February 2025)
7
17
 
8
18
  - Add check to prevent re-initialising if semver file already exists
9
19
  - Add configuration options for semver file
10
20
  - Change rake task namespace from `semantic_release` to `release` and make configurable
11
21
 
12
- ## 1.0.1 (02 February 2025)
22
+ ## v1.0.1 (02 February 2025)
13
23
 
14
24
  - Add blank line after version number in changelog
15
25
  - Remove unnecessary files from gem
16
26
 
17
- ## 1.0.0 (02 February 2025)
27
+ ## v1.0.0 (02 February 2025)
18
28
 
19
29
  - Initial release
data/README.md CHANGED
@@ -48,6 +48,7 @@ The name of the rake task and other options are configurable like so:
48
48
  require "semantic_release/rake_task"
49
49
  SemanticRelease::RakeTask.new(:semver) do |config|
50
50
  config.semver_file = "semver.json"
51
+ config.disable_rubygems_message = true
51
52
  end
52
53
  ```
53
54
 
@@ -73,7 +74,9 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
73
74
 
74
75
  To install this gem onto your local machine, run `bundle exec rake install`.
75
76
 
76
- To release a new version, run `bundle exec rake semver:XXX` (replacing `XXX` with `major` or `minor` or `patch`), which will bump the version number and create a git tag for the version. Then run `bundle exec rake release`, which will push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
77
+ To release a new version, run `bundle exec rake semver:XXX` (replacing `XXX` with `major` or `minor` or `patch`), which will bump the version number and create a git tag for the version. Then run `git push origin main --tags` to push the new tag.
78
+
79
+ Then run `bundle exec rake release`, which will build and push the `.gem` file to [rubygems.org](https://rubygems.org).
77
80
 
78
81
  ## Contributing
79
82
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  module SemanticRelease
4
4
  class Configuration
5
- attr_accessor :semver_file
5
+ attr_accessor :semver_file, :disable_rubygems_message
6
6
 
7
7
  def initialize
8
8
  @semver_file = ".semver"
9
+ @disable_rubygems_message = false
9
10
  end
10
11
  end
11
12
  end
@@ -11,6 +11,10 @@ module SemanticRelease
11
11
  Semver.load(semver_file).to_s
12
12
  end
13
13
 
14
+ def self.current_version_tag
15
+ "v#{current_version}"
16
+ end
17
+
14
18
  def self.semver_file
15
19
  SemanticRelease.configuration.semver_file
16
20
  end
@@ -18,7 +18,7 @@ module SemanticRelease
18
18
  heading_marker = filepath.end_with?(".rdoc") ? "==" : "##"
19
19
  content = File.read(filepath)
20
20
  File.open(filepath, "w") do |f|
21
- f.puts("#{heading_marker} #{current_version} (#{Time.now.strftime("%d %B %Y")})\n\n")
21
+ f.puts("#{heading_marker} #{current_version_tag} (#{Time.now.strftime("%d %B %Y")})\n\n")
22
22
  f.print(content)
23
23
  end
24
24
  end
@@ -3,16 +3,21 @@
3
3
  module SemanticRelease
4
4
  module Updaters
5
5
  class GitTag < BaseUpdater
6
+ # rubocop:disable Style/GuardClause
6
7
  def self.update
7
- tag = "v#{current_version}"
8
- msg = "Increment version to v#{current_version}"
8
+ tag = current_version_tag
9
+ msg = "Increment version to #{tag}"
9
10
 
10
11
  `git add #{semver_file} && git commit -m '#{msg}' && git tag #{tag} -a -m '#{Time.now}'`
11
12
 
12
13
  branch = `git rev-parse --abbrev-ref HEAD`.chomp
13
14
  puts "To push the new tag, use 'git push origin #{branch} --tags'"
14
- puts "OR to push the tag and .gem file to rubygems.org use, 'bundle exec rake release'" if gemspec_present?
15
+
16
+ if gemspec_present? && !SemanticRelease.configuration.disable_rubygems_message
17
+ puts "To build and push the .gem file to rubygems.org use, 'bundle exec rake release'"
18
+ end
15
19
  end
20
+ # rubocop:enable Style/GuardClause
16
21
  end
17
22
  end
18
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SemanticRelease
4
- VERSION = "1.2.0"
4
+ VERSION = "1.3.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_release
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Bull
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-06 00:00:00.000000000 Z
10
+ date: 2025-02-10 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: |
13
13
  This gem helps you to manage the version number of your application or library. It provides Rake tasks to