mirror of
https://github.com/yattee/yattee.git
synced 2026-05-01 21:17:49 +00:00
Un-escape \n in DEVELOPER_KEY_CONTENT before openssl conversion
GitHub secrets store multi-line PEMs as a single line with literal "\n" sequences. Fastlane's app_store_connect_api_key action un-escapes them via gsub before use; the helper must do the same before writing the temp file, otherwise openssl sees garbage.
This commit is contained in:
@@ -33,6 +33,10 @@ def developer_key_content
|
|||||||
return @developer_key_content if defined?(@developer_key_content)
|
return @developer_key_content if defined?(@developer_key_content)
|
||||||
content = ENV['DEVELOPER_KEY_CONTENT']
|
content = ENV['DEVELOPER_KEY_CONTENT']
|
||||||
return @developer_key_content = nil if content.nil? || content.empty?
|
return @developer_key_content = nil if content.nil? || content.empty?
|
||||||
|
# GitHub secrets carry multi-line PEMs as a single line with literal "\n"
|
||||||
|
# escapes; fastlane's action un-escapes these before use, so do the same
|
||||||
|
# here before invoking openssl.
|
||||||
|
content = content.gsub('\n', "\n")
|
||||||
@developer_key_content = Tempfile.open(['AuthKey', '.p8']) do |f|
|
@developer_key_content = Tempfile.open(['AuthKey', '.p8']) do |f|
|
||||||
f.write(content)
|
f.write(content)
|
||||||
f.flush
|
f.flush
|
||||||
|
|||||||
Reference in New Issue
Block a user