File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,12 @@ Gem::Specification.new do |spec|
13
13
# Ref: https://gitlab.com/oauth-xx/version_gem/-/issues/3
14
14
# Hence, only enable signing if the cert_file is present.
15
15
# See CONTRIBUTING.md
16
- cert_file = ENV . fetch ( "GEM_CERT_PATH" , "certs/#{ ENV . fetch ( "GEM_CERT_USER" , ENV [ "USER" ] ) } .pem" )
17
- if cert_file && File . exist? ( File . join ( __dir__ , cert_file ) )
18
- spec . cert_chain = [ ENV . fetch ( "GEM_CERT_PATH" , "certs/#{ ENV . fetch ( "GEM_CERT_USER" , ENV [ "USER" ] ) } .pem" ) ]
16
+ default_user_cert = "certs/#{ ENV . fetch ( "GEM_CERT_USER" , ENV [ "USER" ] ) } .pem"
17
+ default_user_cert_path = File . join ( __dir__ , default_user_cert )
18
+ cert_file_path = ENV . fetch ( "GEM_CERT_PATH" , default_user_cert_path )
19
+ cert_chain = cert_file_path . split ( "," )
20
+ if cert_file_path && cert_chain . map { |fp | File . exist? ( fp ) }
21
+ spec . cert_chain = cert_chain
19
22
if $PROGRAM_NAME. end_with? ( "gem" , "rake" ) && ARGV [ 0 ] == "build"
20
23
spec . signing_key = File . expand_path ( "~/.ssh/gem-private_key.pem" )
21
24
end
You can’t perform that action at this time.
0 commit comments