mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-09-30 06:33:13 +00:00
Fix ASC key format detection: handle both raw PEM and base64
The secret may contain either raw PEM text (with BEGIN header) or base64-encoded PEM. Detect format and pass appropriately to fastlane instead of blindly base64-decoding (which corrupts raw PEM content).
This commit is contained in:
parent
a0ccf676b8
commit
9cd12ceb79
1 changed files with 10 additions and 2 deletions
|
|
@ -20,12 +20,20 @@ platform :ios do
|
|||
lane :beta do
|
||||
setup_ci
|
||||
|
||||
key_content = Base64.decode64(ENV["ASC_KEY_CONTENT"])
|
||||
raw = ENV["ASC_KEY_CONTENT"]
|
||||
if raw.include?("BEGIN")
|
||||
key_content = raw.gsub('\n', "\n")
|
||||
is_base64 = false
|
||||
else
|
||||
key_content = raw
|
||||
is_base64 = true
|
||||
end
|
||||
|
||||
app_store_connect_api_key(
|
||||
key_id: ENV["ASC_KEY_ID"],
|
||||
issuer_id: ENV["ASC_ISSUER_ID"],
|
||||
key_content: key_content,
|
||||
is_key_content_base64: false
|
||||
is_key_content_base64: is_base64
|
||||
)
|
||||
|
||||
match(type: "appstore", readonly: true)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue