check app name in script

This commit is contained in:
Oleksii Bulenok
2026-07-06 15:37:31 +02:00
parent 23b75c3f23
commit d91e3991bf
+11
View File
@@ -9,6 +9,17 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
ANDROID_DIR="$REPO_ROOT/android"
APK_OUTPUT_DIR="$ANDROID_DIR/app/build/outputs/apk/release"
SETTINGS_GRADLE="$ANDROID_DIR/settings.gradle"
# Guard against building with the wrong app identity. The New Arch build must
# use a distinct rootProject.name so it installs alongside the store app rather
# than overwriting it.
EXPECTED_APP_NAME="rootProject.name = 'Bluesky (New Arch)'"
if ! grep -qF "$EXPECTED_APP_NAME" "$SETTINGS_GRADLE"; then
echo "Error: expected \"$EXPECTED_APP_NAME\" in $SETTINGS_GRADLE" >&2
echo "(Set the app name in settings.gradle before building the New Arch release.)" >&2
exit 1
fi
BRANCH_NAME="$(git -C "$REPO_ROOT" rev-parse --abbrev-ref HEAD)"
COMMIT_HASH="$(git -C "$REPO_ROOT" rev-parse --short=6 HEAD)"