semantic_release 1.1.0 → 1.2.1

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: a55331e98f6d84634c6bbc2a629737890a88e9e7ad17a533928f74feb725c621
4
- data.tar.gz: 9f026fe48e630dc6d43349ed0db545bc736c8ae6ff09abd7d872a5689fcbeba8
3
+ metadata.gz: ab408baff3b214c64b1c2ceabc4d2b89cbd36fb6e22d1fd9fcc24eba17e9f67b
4
+ data.tar.gz: 161db6943eb86f2109286e52fc561d1c309a25fcf15af87f2d771d306782c428
5
5
  SHA512:
6
- metadata.gz: f0bd2de32e63c96e7373d797797ec977ac44d3533b60658aaff6be0edca37cee72790081ded9b0327745478a547e127c6bae61b8699b6ba89b9d4546bcd703f2
7
- data.tar.gz: e7545da7de6ccc9f8df6e4d9adf550b29f3e764d1741ce189e421ec746ca4ea1a8bf93f6ca4f79de752f45007edd58ee3052385ca4fb23fe2469ce781543ce92
6
+ metadata.gz: aadd1a32fa94041e9adb258ed2542bb93588c016b53d987425f3e85527e88b300b51eece3cddc72328a210b5868077101ec1b7e38708ccc740fb64580366effc
7
+ data.tar.gz: 5ba80adf3b385336293728b67bbbb7ae5dbf2a927f7c95db3f0499f0a7e24edcf81c0e9894302bcdeb034bf59c4eef3bcf8da81b0c90a03c8f2b3f7ae822d2c0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 1.2.1 (06 February 2025)
2
+
3
+ ## 1.2.0 (06 February 2025)
4
+
5
+ - feat: Mention 'rake release' in git tag updater output if a gemspec file is present
6
+ - feat: Stage Gemfile.lock after bumping version.rb if a gemspec file is present
7
+
1
8
  ## 1.1.0 (03 February 2025)
2
9
 
3
10
  - Add check to prevent re-initialising if semver file already exists
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # SemanticRelease
2
2
 
3
+ [![Build Status](https://github.com/ukdave/semantic_release/actions/workflows/main.yml/badge.svg)](https://github.com/ukdave/semantic_release/actions/workflows/main.yml)
4
+ [![Release](https://img.shields.io/github/v/release/ukdave/semantic_release)](https://github.com/ukdave/semantic_release/releases)
5
+ [![License](https://img.shields.io/github/license/ukdave/semantic_release)](https://github.com/ukdave/semantic_release/blob/main/LICENSE.txt)
6
+
3
7
  This gem helps you to manage the version number of your application or library.
4
8
 
5
9
  Use the provided Rake tasks to:
@@ -38,7 +42,7 @@ require "semantic_release/rake_task"
38
42
  SemanticRelease::RakeTask.new
39
43
  ```
40
44
 
41
- The name rake tasks and other options are configurable like so:
45
+ The name of the rake task and other options are configurable like so:
42
46
 
43
47
  ```ruby
44
48
  require "semantic_release/rake_task"
@@ -67,7 +71,11 @@ SemanticRelease.current_version
67
71
 
68
72
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
69
73
 
70
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
74
+ To install this gem onto your local machine, run `bundle exec rake install`.
75
+
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 `git push origin main --tags` to push the new tag.
77
+
78
+ Then run `bundle exec rake release`, which will build and push the `.gem` file to [rubygems.org](https://rubygems.org).
71
79
 
72
80
  ## Contributing
73
81
 
@@ -14,6 +14,10 @@ module SemanticRelease
14
14
  def self.semver_file
15
15
  SemanticRelease.configuration.semver_file
16
16
  end
17
+
18
+ def self.gemspec_present?
19
+ !Dir.glob("*.gemspec").empty?
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SemanticRelease
4
+ module Updaters
5
+ class GemfileLock < BaseUpdater
6
+ def self.update
7
+ return unless gemspec_present?
8
+ return if system("git check-ignore -q Gemfile.lock")
9
+
10
+ `bundle check && git add Gemfile.lock`
11
+ end
12
+ end
13
+ end
14
+ end
@@ -11,6 +11,7 @@ module SemanticRelease
11
11
 
12
12
  branch = `git rev-parse --abbrev-ref HEAD`.chomp
13
13
  puts "To push the new tag, use 'git push origin #{branch} --tags'"
14
+ puts "To push build and push the .gem file to rubygems.org use, 'bundle exec rake release'" if gemspec_present?
14
15
  end
15
16
  end
16
17
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SemanticRelease
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -47,6 +47,7 @@ module SemanticRelease
47
47
  def self.release
48
48
  Updaters::Changelog.update
49
49
  Updaters::VersionRb.update
50
+ Updaters::GemfileLock.update
50
51
  Updaters::GitTag.update
51
52
  end
52
53
  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.1.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Bull
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-03 00:00:00.000000000 Z
10
+ date: 2025-02-06 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
@@ -27,6 +27,7 @@ files:
27
27
  - lib/semantic_release/semver.rb
28
28
  - lib/semantic_release/updaters/base_updater.rb
29
29
  - lib/semantic_release/updaters/changelog.rb
30
+ - lib/semantic_release/updaters/gemfile_lock.rb
30
31
  - lib/semantic_release/updaters/git_tag.rb
31
32
  - lib/semantic_release/updaters/version_rb.rb
32
33
  - lib/semantic_release/version.rb