-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure build fails if changes are detected while building for linux
- Loading branch information
1 parent
2c10be2
commit 7fc2ec9
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
readonly ROOT_DIR="$(cd "$(dirname -- "$0")/.." >/dev/null; pwd -P)" | ||
|
||
CHANGED_FILES=$(git -C "$ROOT_DIR" status --untracked-files=no --porcelain | wc -l) | ||
|
||
if [[ "$CHANGED_FILES" -eq 0 ]]; then | ||
echo "Clean working directory" | ||
else | ||
echo "Changes detected" >/dev/stderr | ||
git status --untracked-files=no >/dev/stderr | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters