You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to know if we've introduced assets that are not being packaged.
It should ignore gitignored and manually blacklisted files (e.g. the packaging scripts themselves).
We can take inspiration from CJK's gruggy shell script:
#!/usr/bin/env bash# purpose: list files that are missing from the package scriptset -euo pipefail
BLACKLIST=(
./package-files.txt
./package-find-missing.sh
./package.sh
./README.md
)
# FIXME: we can probably `return 1` instead of a dirty-flag breakfile_is_blacklisted() {
local needle="$1"
match=0
forbad_filein"${BLACKLIST[@]}";doif [[ $bad_file="$needle" ]];then
match=1
breakfidone
[[ $match!= 0 ]]
}
list_files() {
while IFS=''read -r -d '' file;doif git check-ignore "$file">/dev/null || file_is_blacklisted "$file";thenecho>&2"Ignoring $file"elseecho"$file"fidone<<(find ./* -type f -print0)
}
list_files | sort | git diff --no-index -- package-files.txt - # comm -13 package-files.txt -
The text was updated successfully, but these errors were encountered:
We want to know if we've introduced assets that are not being packaged.
It should ignore gitignored and manually blacklisted files (e.g. the packaging scripts themselves).
We can take inspiration from CJK's gruggy shell script:
The text was updated successfully, but these errors were encountered: