bake-gem 0.13.1 → 0.14.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: 1921512c8e66685c7ced03e581fa8ecafea58e93720540dc80dd6ee84ebafaf9
4
- data.tar.gz: 9ffa14838c160f994189bf54499420a891c6364d7629834c88b9babafdf30237
3
+ metadata.gz: c8159704892dcd4d98b3562f7c4867a24e4efa26936dbda61f125e1d50173eea
4
+ data.tar.gz: 4c0001d022cef9b2a9a8eeae6d7a7a90e10b42a11cdb6311cbed87d6b2817db6
5
5
  SHA512:
6
- metadata.gz: 76ef768494dcf189e0aaf4651a7c3c03bc0d5f4bcd0e87ccb5fd5c890f8d20b49ffb2149e523ae912d752a15ad2614f8dd2a1aaf6d0b5091890d749d9fac105e
7
- data.tar.gz: 27740a73d10724a9b88d5bf880621a4c80e644ad5a6accd714b4014b67ba055e1548a0d9a8c83accd08ecddafb892bf7c64ce269ca55a05d8e876739e606635e
6
+ metadata.gz: bd14d2adc3026d423bc75826dcfc4d8fde6777c0df54d68fe6ba0a995e84081748a48e981317fb7312a9cffff81eaa7557d4070fc67ca8c3547d98525bc0329f
7
+ data.tar.gz: f9e1951d82b11086f3c05c77098d2b6b3ac12a51ead185e809874eaf88e85b15a6877fb8da89eea05e119039f4cc0b3feef898b157f09de93c5d36dc4532623b
checksums.yaml.gz.sig CHANGED
Binary file
data/bake/gem.rb CHANGED
@@ -31,8 +31,14 @@ end
31
31
  # Build and install the gem into system gems.
32
32
  # @parameter local [Boolean] only use locally available caches.
33
33
  def install(local: false)
34
- # For installing the gem, don't bother with signinng it:
35
- path = @helper.build_gem(signing_key: false)
34
+ changes = @helper.uncommitted_changes
35
+
36
+ if changes.any?
37
+ Console.warn(self, "Installing from clean git worktree; uncommitted changes are not included in the installed gem.", changes: changes.map(&:chomp))
38
+ end
39
+
40
+ # For installing the gem, don't bother with signing it:
41
+ path = @helper.build_gem_in_worktree(signing_key: false)
36
42
 
37
43
  arguments = []
38
44
  arguments << "--local" if local
@@ -151,7 +151,7 @@ module Bake
151
151
  # @returns [Boolean] True if the repository is clean.
152
152
  # @raises [RuntimeError] If there are uncommitted changes in the repository.
153
153
  def guard_clean
154
- lines = readlines("git", "status", "--porcelain", chdir: @root)
154
+ lines = uncommitted_changes
155
155
 
156
156
  if lines.any?
157
157
  raise "Repository has uncommited changes!\n#{lines.join('')}"
@@ -160,6 +160,12 @@ module Bake
160
160
  return true
161
161
  end
162
162
 
163
+ # Get the list of uncommitted changes in the repository.
164
+ # @returns [Array(String)] The porcelain status lines for uncommitted changes.
165
+ def uncommitted_changes
166
+ readlines("git", "status", "--porcelain", chdir: @root)
167
+ end
168
+
163
169
  # Verify that the last commit was not a version bump.
164
170
  # @returns [Boolean] True if the last commit was not a version bump.
165
171
  # @raises [RuntimeError] If the last commit was a version bump.
@@ -11,6 +11,9 @@ module Bake
11
11
  module Gem
12
12
  # Exception raised when a command execution fails.
13
13
  class CommandExecutionError < RuntimeError
14
+ # Initialize the exception with the specified message and process status.
15
+ # @parameter message [String] The error message.
16
+ # @parameter status [Process::Status] The status object of the failed command.
14
17
  def initialize(message, status)
15
18
  super(message)
16
19
  @status = status
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Bake
7
7
  module Gem
8
- VERSION = "0.13.1"
8
+ VERSION = "0.14.0"
9
9
  end
10
10
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 4.0.6
95
+ rubygems_version: 4.0.3
96
96
  specification_version: 4
97
97
  summary: Release management for Ruby gems.
98
98
  test_files: []
metadata.gz.sig CHANGED
Binary file