gemchain 0.2.1 → 0.2.2

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: 29cc49ef5619e2bf869d99e3785600c68fce13cac87d5f455103e82ad67964df
4
- data.tar.gz: e3ee5374417db2c3bf89028b0eb2527dd698217f850bfc9402e1c68c364aed61
3
+ metadata.gz: 7f57089a36952e2778e0ca90654ee97a6484ba1f6f9c002a91c1a30089c6973a
4
+ data.tar.gz: cd1f24b7232ba48c8f1135d8e80374eb656e49e3322d3773b1f3680020761160
5
5
  SHA512:
6
- metadata.gz: 5b37952e40c01005984baae5a1d077b62af99ab7b77f9a464578dd16a02ec33b6e4c3a371ab7bdeadd99fbbc6c1e9c590f0744d0ab80e4100aa431e5a9ab9c46
7
- data.tar.gz: 9f9e33a3c2cf12eeb19e0eb641523dfa6e46eadccef43a79352cb4446e6e8ffd77acad93fc1d9697de9c33fa6590634cbd67c20073ff67bafe8895cac62bec96
6
+ metadata.gz: 989b65d9e09fc06ea8445c7137b5e641fd001f7ab332023132a075c91e3a1d7b9649d34470fe78650d2c258507e5f2729d253824d85ec38b082b2efd7121e829
7
+ data.tar.gz: 65efa9a75881d8880d950c2b880816e10d575c9cbf728f427a0679f5fc6fc77c37f41d836a44d5359dbd412b0d8e6bf18db25772c2cae317d37b53dc58dcef1b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [0.2.2] — 2026-08-13
2
+
3
+ ### Fixed
4
+
5
+ - **Release skips the commit when nothing is staged** — a source gem whose
6
+ version bump was already committed (e.g. a fix shipped together with the
7
+ bump) crashed the cascade with "nothing to commit, working tree clean".
8
+ `:release` now checks for staged changes (`git diff --cached --quiet`)
9
+ and skips the commit while still building, pushing, and tagging.
10
+
1
11
  # Changelog
2
12
 
3
13
  ## [0.2.1] — 2026-08-12
@@ -23,6 +23,13 @@ module Gemchain
23
23
  detail = out.lines.first(5).join.strip if detail.empty?
24
24
  raise ExecutionError, "Command failed: #{command.join(' ')}#{detail.empty? ? '' : "\n#{detail}"}"
25
25
  end
26
+
27
+ # Runs a command and reports success without raising. Used for
28
+ # conditional checks (e.g. "are there staged changes?").
29
+ def success?(command, chdir: nil)
30
+ _out, _err, status = Open3.capture3(*command, chdir: chdir)
31
+ status.success?
32
+ end
26
33
  end
27
34
 
28
35
  BUMP_LEVELS = %i[patch minor major].freeze
@@ -170,7 +177,12 @@ module Gemchain
170
177
  else
171
178
  "Bump to #{version} (gemchain)"
172
179
  end
173
- @runner.run(["git", "commit", "-m", message], chdir: dir)
180
+ # Skip the commit when the release's own bump/constraint changes were
181
+ # already committed (e.g. a fix shipped together with the version
182
+ # bump) — `git commit` would fail on a clean tree.
183
+ unless @runner.success?(["git", "diff", "--cached", "--quiet"], chdir: dir)
184
+ @runner.run(["git", "commit", "-m", message], chdir: dir)
185
+ end
174
186
 
175
187
  @runner.run(["gem", "build", "#{name}.gemspec"], chdir: dir)
176
188
  @runner.run(["gem", "push", "#{name}-#{version}.gem"], chdir: dir)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gemchain
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemchain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 4.0.3
112
+ rubygems_version: 4.0.18
113
113
  specification_version: 4
114
114
  summary: Cascade gem updates through interdependent gem ecosystems
115
115
  test_files: []