Skip to content

Update encrypted file secrets. #1612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified scripts/gha-encrypted/analytics/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/analytics/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/app/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/app/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/app_check/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/app_check/app_check_token.txt.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/app_check/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/auth/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/auth/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/database/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/database/google-services.json.gpg
Binary file not shown.
Binary file not shown.
Binary file modified scripts/gha-encrypted/dynamic_links/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/dynamic_links/uri_prefix.txt.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/firestore/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/firestore/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/functions/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/functions/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/gcs_key_file.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/gma/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/gma/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/installations/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/installations/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/messaging/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/messaging/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/remote_config/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/remote_config/google-services.json.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/storage/GoogleService-Info.plist.gpg
Binary file not shown.
Binary file modified scripts/gha-encrypted/storage/google-services.json.gpg
Binary file not shown.
15 changes: 10 additions & 5 deletions scripts/gha/restore_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def _decrypt(encrypted_file, passphrase):
encrypted_file],
check=False,
text=True,
capture_output=True)
capture_output=True,
encoding="cp1252")
if result.returncode:
# Remove any instances of the passphrase from error before logging it.
raise RuntimeError(result.stderr.replace(passphrase, "****"))
Expand All @@ -183,10 +184,14 @@ def _patch_reverse_id(service_plist_path):
print("Attempting to patch reverse id in Info.plist")
with open(service_plist_path, "rb") as f:
service_plist = plistlib.load(f)
_patch_file(
path=os.path.join(os.path.dirname(service_plist_path), "Info.plist"),
placeholder="REPLACE_WITH_REVERSED_CLIENT_ID",
value=service_plist["REVERSED_CLIENT_ID"])

try:
_patch_file(
path=os.path.join(os.path.dirname(service_plist_path), "Info.plist"),
placeholder="REPLACE_WITH_REVERSED_CLIENT_ID",
value=service_plist["REVERSED_CLIENT_ID"])
except KeyError as e:
print("No REVERSED_CLIENT_ID in plist, skipping.")


def _patch_bundle_id(service_plist_path):
Expand Down
Loading