Skip to content

Commit 92365e8

Browse files
committed
Update script to ignore reversed client ID error, and update GCS json.
1 parent 76aeb72 commit 92365e8

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed
-8 Bytes
Binary file not shown.

scripts/gha/restore_secrets.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def _decrypt(encrypted_file, passphrase):
169169
encrypted_file],
170170
check=False,
171171
text=True,
172-
capture_output=True)
172+
capture_output=True,
173+
encoding="cp1252")
173174
if result.returncode:
174175
# Remove any instances of the passphrase from error before logging it.
175176
raise RuntimeError(result.stderr.replace(passphrase, "****"))
@@ -183,10 +184,14 @@ def _patch_reverse_id(service_plist_path):
183184
print("Attempting to patch reverse id in Info.plist")
184185
with open(service_plist_path, "rb") as f:
185186
service_plist = plistlib.load(f)
186-
_patch_file(
187-
path=os.path.join(os.path.dirname(service_plist_path), "Info.plist"),
188-
placeholder="REPLACE_WITH_REVERSED_CLIENT_ID",
189-
value=service_plist["REVERSED_CLIENT_ID"])
187+
188+
try:
189+
_patch_file(
190+
path=os.path.join(os.path.dirname(service_plist_path), "Info.plist"),
191+
placeholder="REPLACE_WITH_REVERSED_CLIENT_ID",
192+
value=service_plist["REVERSED_CLIENT_ID"])
193+
except KeyError as e:
194+
print("No REVERSED_CLIENT_ID in plist, skipping.")
190195

191196

192197
def _patch_bundle_id(service_plist_path):

0 commit comments

Comments
 (0)