mirror of
https://github.com/robinraju/release-downloader.git
synced 2026-10-02 08:46:05 +03:00
* Migrate to ESM * update checks * Add a precommit hook to avoid changes to dist * Fix failure on windows * Fix failure on windows
14 lines
457 B
Plaintext
14 lines
457 B
Plaintext
# Unstage any changes to dist/ - it is CI-managed and must not be committed manually.
|
|
staged_dist="$(git diff --cached --name-only -- dist)"
|
|
|
|
if [ -n "$staged_dist" ]; then
|
|
git reset HEAD -- dist >/dev/null
|
|
|
|
echo "✖ Refusing to commit changes under dist/ (CI-managed)."
|
|
echo " The following files have been unstaged:"
|
|
echo "$staged_dist" | sed 's/^/ /'
|
|
echo
|
|
echo " Re-run your commit. Working-tree files were left untouched."
|
|
exit 1
|
|
fi
|