configure_trusted_publisher 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '069cf11b54abc980ac845968c09a93b3779aa4153ca6ae8c4e58093352fd5270'
4
- data.tar.gz: 4da5f62636b14c6837fadb4847f27e3267b13797ba4e4c66a4e9bbbfe35adc48
3
+ metadata.gz: d8825e07f3f9352aeda01d6f45d1806e6d148cad2c7583595126989efcf1a9ba
4
+ data.tar.gz: 86ddce0733c9831c87e5b374ca1d69e3f36751da515cd6ddcaf19d02e6652222
5
5
  SHA512:
6
- metadata.gz: 146c6c690a138f3c837aa7aee7fa39e25b9cbc08a30884a2441fcf796ca46e691814ca1c039d10e2ecc8fe4309b91aebd67152a95fc062e050cb41957f4fe9b9
7
- data.tar.gz: 9aeff4f526331e46da39edba8bacc5eebfea0f6d2ab6b703195032dec8c0c4842ca34136a4cca35e995741864a12ad484a0e99781a941eb1c8ddb4d1f151c1f0
6
+ metadata.gz: 8ef9d2fb3b4848d8e5241fce485cb1dbe9ef66d6a2d1b8a6479ea7381e97ce4281d0b9db57b3b93a89060229618aac4c6efd9a77ddbd7f5bc3221497dfbafb73
7
+ data.tar.gz: fe25ac3a350ebaf0dffacd5ac734a4aab5a6f2b1f3b80d38727b3dac91612da11b79e6f0e56610836346f131118b5ed4b072f51492b4f7e0991a07a7f39fd67c
@@ -169,7 +169,7 @@ module ConfigureTrustedPublisher
169
169
  },
170
170
  terminate_interaction: lambda { |msg|
171
171
  puts
172
- exit msg
172
+ abort msg
173
173
  },
174
174
  otp: options[:otp]
175
175
  )
@@ -253,8 +253,8 @@ module ConfigureTrustedPublisher
253
253
  "prerequisites for the action?")
254
254
 
255
255
  if Bundler.which("gh").nil?
256
- exit "The GitHub CLI (gh) is required to add a GitHub environment. " \
257
- "Please install it from https://cli.github.com/ and try again."
256
+ abort "The GitHub CLI (gh) is required to add a GitHub environment. " \
257
+ "Please install it from https://cli.github.com/ and try again."
258
258
  end
259
259
 
260
260
  env_name = "rubygems.org"
@@ -262,7 +262,7 @@ module ConfigureTrustedPublisher
262
262
  owner, name = github_repository
263
263
  puts "Adding GitHub environment to #{owner}/#{name} to protect the action"
264
264
  if (env = Open3.capture2e("gh", "api", "repos/#{owner}/#{name}/environments").then do |output, status|
265
- exit "Failed to list environments for #{owner}/#{name} using `gh api`:\n#{output}" unless status.success?
265
+ abort "Failed to list environments for #{owner}/#{name} using `gh api`:\n#{output}" unless status.success?
266
266
 
267
267
  JSON.parse(output)["environments"].find { |e| e["name"] == env_name }
268
268
  end)
@@ -273,7 +273,7 @@ module ConfigureTrustedPublisher
273
273
  Open3.capture2e("gh", "api", "--method", "PUT",
274
274
  "repos/#{owner}/#{name}/environments/#{env_name}").then do |output, status|
275
275
  unless status.success?
276
- exit "Failed to create rubygems.org environment for #{owner}/#{name} using `gh api`:\n#{output}"
276
+ abort "Failed to create rubygems.org environment for #{owner}/#{name} using `gh api`:\n#{output}"
277
277
  end
278
278
 
279
279
  env = JSON.parse(output)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConfigureTrustedPublisher
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configure_trusted_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Giddins