mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
b077f71015
This was breaking the release process. Namely it was running the `gen` targets due to the dependency tree, which was failing on macOS and Linux runners. This revert can be reverted once we fix that up.
31 lines
552 B
Bash
Executable File
31 lines
552 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
|
PROJECT_ROOT=$(cd "$SCRIPT_DIR" && git rev-parse --show-toplevel)
|
|
|
|
(
|
|
cd "${PROJECT_ROOT}"
|
|
|
|
FILES="$(git ls-files --other --modified --exclude-standard)"
|
|
if [[ "$FILES" != "" ]]; then
|
|
mapfile -t files <<<"$FILES"
|
|
|
|
echo "The following files contain unstaged changes:"
|
|
echo
|
|
for file in "${files[@]}"; do
|
|
echo " - $file"
|
|
done
|
|
echo
|
|
|
|
echo "These are the changes:"
|
|
echo
|
|
for file in "${files[@]}"; do
|
|
git --no-pager diff "$file"
|
|
done
|
|
exit 1
|
|
fi
|
|
)
|
|
exit 0
|