mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
e490bdd531
This caused the following issues: - Slim binaries weren't being updated. - The coder.tar.ztd was misplaced. - There is no coder.sha1 file with proper filenames. This should be reintroduced in a future change with those fixes.
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
|