mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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.
This commit is contained in:
+23
-21
@@ -1,28 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
# shellcheck source=scripts/lib.sh
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
||||
cdroot
|
||||
|
||||
FILES="$(git ls-files --other --modified --exclude-standard)"
|
||||
if [[ "$FILES" != "" ]]; then
|
||||
mapfile -t files <<<"$FILES"
|
||||
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
PROJECT_ROOT=$(cd "$SCRIPT_DIR" && git rev-parse --show-toplevel)
|
||||
|
||||
log
|
||||
log "The following files contain unstaged changes:"
|
||||
log
|
||||
for file in "${files[@]}"; do
|
||||
log " - $file"
|
||||
done
|
||||
(
|
||||
cd "${PROJECT_ROOT}"
|
||||
|
||||
log
|
||||
log "These are the changes:"
|
||||
log
|
||||
for file in "${files[@]}"; do
|
||||
git --no-pager diff "$file" 1>&2
|
||||
done
|
||||
FILES="$(git ls-files --other --modified --exclude-standard)"
|
||||
if [[ "$FILES" != "" ]]; then
|
||||
mapfile -t files <<<"$FILES"
|
||||
|
||||
log
|
||||
error "Unstaged changes, see above for details."
|
||||
fi
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user