diff --git a/.gitignore b/.gitignore index b192b29a9..97a324107 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ ## Private assets +# Generated into the app bundle by Scripts/gengoogle; a copy here is stale. +Flipcash/Supporting Files/GoogleService-Info.plist Configurations/secrets.local.xcconfig ci_scripts/ci_post_xcodebuild.sh .env diff --git a/Code.xcodeproj/project.pbxproj b/Code.xcodeproj/project.pbxproj index 9e966b410..d73833c10 100644 --- a/Code.xcodeproj/project.pbxproj +++ b/Code.xcodeproj/project.pbxproj @@ -148,6 +148,7 @@ isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( "Supporting Files/apple-app-site-association", + "Supporting Files/GoogleService-Info.plist", "Supporting Files/Info.plist", ); target = 9A516F792D9B12E800AF478B /* Flipcash */; @@ -417,10 +418,10 @@ isa = PBXNativeTarget; buildConfigurationList = 9A516F9B2D9B12EA00AF478B /* Build configuration list for PBXNativeTarget "Flipcash" */; buildPhases = ( - 9ADEF1CD2DD516A5001B260A /* Generate Google */, 9A516F762D9B12E800AF478B /* Sources */, 9A516F772D9B12E800AF478B /* Frameworks */, 9A516F782D9B12E800AF478B /* Resources */, + 9ADEF1CD2DD516A5001B260A /* Generate Google */, 4C7D70022FC8892D0091C7A4 /* Embed Foundation Extensions */, ); buildRules = ( @@ -656,11 +657,11 @@ outputFileListPaths = ( ); outputPaths = ( - "$(SOURCE_ROOT)/Flipcash/Supporting Files/GoogleService-Info.plist", + "$(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"$SOURCE_ROOT/Scripts\"\n\n./gengoogle \"$SOURCE_ROOT/Flipcash/Supporting Files/GoogleService-Info.plist\" \"FG_\"\n"; + shellScript = "cd \"$SOURCE_ROOT/Scripts\"\n\n./gengoogle \"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/GoogleService-Info.plist\" \"FG_\"\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Flipcash/Supporting Files/GoogleService-Info.plist b/Flipcash/Supporting Files/GoogleService-Info.plist deleted file mode 100644 index a33159571..000000000 --- a/Flipcash/Supporting Files/GoogleService-Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CLIENT_ID - - REVERSED_CLIENT_ID - - API_KEY - - GCM_SENDER_ID - - PLIST_VERSION - - BUNDLE_ID - - PROJECT_ID - - STORAGE_BUCKET - - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - FirebaseAppDelegateProxyEnabled - - GoogleUtilitiesAppDelegateProxyEnabled - - GOOGLE_APP_ID - - - diff --git a/Scripts/git-hooks/pre-commit b/Scripts/git-hooks/pre-commit index b3974f3fc..946c0e46d 100755 --- a/Scripts/git-hooks/pre-commit +++ b/Scripts/git-hooks/pre-commit @@ -3,6 +3,7 @@ # CI scripts, or any file that flips between dummy/real values per local # environment. Most of these are gitignored, but `git add -f` bypasses # .gitignore and would silently commit secrets; this hook is the safety net. +# Deletions pass: removing a file cannot leak its contents. set -e @@ -48,7 +49,7 @@ while IFS= read -r -d '' staged_path; do $pattern) block "$staged_path" ;; esac done -done < <(git diff --cached --name-only -z) +done < <(git diff --cached --name-only --diff-filter=d -z) # Contract pins: FlipcashAPI/Package.swift pins each contract package with an # exact version, and the workspace Package.resolved has to record the same one.