-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for uncommitted files beyond
dist/
directory (#278)
This checks for _any_ delta in the git repo, not just the `dist/` directory. Any change should fail CI until it's either committed or added to `.gitignore`. Additionally, I clarified the script name/code slightly to explain why it's needed/handled separately from checking for uncommitted files.
- Loading branch information
1 parent
e2a976c
commit 06df9f8
Showing
3 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# Make sure we notice any untracked files generated by the build in the dist/ directory | ||
git add --intent-to-add . | ||
git diff --quiet dist/ | ||
retVal=$? | ||
if [ $retVal -ne 0 ]; then | ||
echo "Detected uncommitted changes after build:" | ||
# The contents of the diff/ folder are marked as generated: | ||
# https://github.com/dependabot/fetch-metadata/blob/6c2bf2fe33cc133b474165107a8b29ccc265dc96/.gitattributes#L1 | ||
# so this ensures we spit out the actual change in the obfuscated JS. | ||
git --no-pager diff dist/ | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.