coder/scripts/check_unstaged.sh
Dean Sheather 819622182b chore: parallel makefile attempt 3 (#3926)
* Revert "chore: Revert parallel Makefile builds (#3918)"

This reverts commit b077f71015e452a4c507735adc4d6ee3f4a77327.

* fix: fix release workflow with parallel makefile

* fix: mark generated files as fresh during releases
2022-09-08 02:40:17 +10:00

29 lines
534 B
Bash
Executable File

#!/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"
log
log "The following files contain unstaged changes:"
log
for file in "${files[@]}"; do
log " - $file"
done
log
log "These are the changes:"
log
for file in "${files[@]}"; do
git --no-pager diff "$file" 1>&2
done
log
error "Unstaged changes, see above for details."
fi