commit 6f1fb1cae3cd553ae7ec97333cba58c78a4a4a59
parent e48eb897fd7c7206325b232d69277a489c6d3143
Author: Michael Camilleri <[email protected]>
Date: Fri, 6 Mar 2026 21:13:33 +0900
Update publishing scripts to exit early if repository is dirty
Diffstat:
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Scripts/publish-ios.sh b/Scripts/publish-ios.sh
@@ -26,6 +26,11 @@ fi
cd "$REPO_ROOT"
+if ! git diff --quiet || ! git diff --cached --quiet; then
+ echo "Error: Git repository is dirty. Commit or stash changes before publishing."
+ exit 1
+fi
+
echo "==> Setting up temporary keychain..."
security delete-keychain "$TMP_KEYCHAIN" 2>/dev/null || true
security create-keychain -p "$TMP_KEYCHAIN_PASS" "$TMP_KEYCHAIN"
diff --git a/Scripts/publish-macos.sh b/Scripts/publish-macos.sh
@@ -24,6 +24,11 @@ TMP_KEYCHAIN="$REPO_ROOT/.asc/build.keychain-db"
cd "$REPO_ROOT"
+if ! git diff --quiet || ! git diff --cached --quiet; then
+ echo "Error: Git repository is dirty. Commit or stash changes before publishing."
+ exit 1
+fi
+
echo "==> Setting up temporary keychain..."
security delete-keychain "$TMP_KEYCHAIN" 2>/dev/null || true
security create-keychain -p "$TMP_KEYCHAIN_PASS" "$TMP_KEYCHAIN"