check app name in script
This commit is contained in:
@@ -9,6 +9,17 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
ANDROID_DIR="$REPO_ROOT/android"
|
ANDROID_DIR="$REPO_ROOT/android"
|
||||||
APK_OUTPUT_DIR="$ANDROID_DIR/app/build/outputs/apk/release"
|
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)"
|
BRANCH_NAME="$(git -C "$REPO_ROOT" rev-parse --abbrev-ref HEAD)"
|
||||||
COMMIT_HASH="$(git -C "$REPO_ROOT" rev-parse --short=6 HEAD)"
|
COMMIT_HASH="$(git -C "$REPO_ROOT" rev-parse --short=6 HEAD)"
|
||||||
|
|||||||
Reference in New Issue
Block a user