File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,15 @@ Gem::Specification.new do |spec|
1313 # Ref: https://gitlab.com/oauth-xx/version_gem/-/issues/3
1414 # Hence, only enable signing if the cert_file is present.
1515 cert_file = ENV . fetch ( "GEM_CERT_PATH" , "certs/#{ ENV . fetch ( "GEM_CERT_USER" , ENV [ "USER" ] ) } .pem" )
16- if cert_file && File . exist? ( cert_file )
16+ if cert_file && File . exist? ( File . join ( __dir__ , cert_file ) )
1717 spec . cert_chain = [ ENV . fetch ( "GEM_CERT_PATH" , "certs/#{ ENV . fetch ( "GEM_CERT_USER" , ENV [ "USER" ] ) } .pem" ) ]
18- if $PROGRAM_NAME. end_with? ( "gem" ) && ARGV == [ "build" , __FILE__ ]
18+ if $PROGRAM_NAME. end_with? ( "gem" , "rake" ) && ARGV [ 0 ] == "build"
1919 spec . signing_key = File . expand_path ( "~/.ssh/gem-private_key.pem" )
20+ else
21+ warn "Packaging via #{ $PROGRAM_NAME} with #{ ARGV . inspect } "
2022 end
23+ else
24+ warn "No Cert File Found. May package without signing."
2125 end
2226
2327 spec . name = "version_gem"
You can’t perform that action at this time.
0 commit comments