Prepare ConfigKit v0.1.0
This commit is contained in:
@@ -25,8 +25,13 @@ bash -n scripts/release-check.sh
|
||||
|
||||
temporary_dir=$(mktemp -d)
|
||||
trap 'rm -rf -- "$temporary_dir"' EXIT
|
||||
git ls-files --cached --others --exclude-standard -z |
|
||||
tar --null --files-from=- --create --file=- |
|
||||
candidate_manifest=$temporary_dir/candidate-files
|
||||
while IFS= read -r -d '' candidate_file; do
|
||||
if [[ -e "$candidate_file" || -L "$candidate_file" ]]; then
|
||||
printf '%s\0' "$candidate_file" >>"$candidate_manifest"
|
||||
fi
|
||||
done < <(git ls-files --cached --others --exclude-standard -z)
|
||||
tar --null --files-from="$candidate_manifest" --create --file=- |
|
||||
tar --extract --file=- --directory="$temporary_dir"
|
||||
(
|
||||
cd "$temporary_dir"
|
||||
@@ -37,7 +42,9 @@ diff -u go.sum "$temporary_dir/go.sum"
|
||||
|
||||
go_files=()
|
||||
while IFS= read -r -d '' go_file; do
|
||||
go_files+=("$go_file")
|
||||
if [[ -f "$go_file" ]]; then
|
||||
go_files+=("$go_file")
|
||||
fi
|
||||
done < <(git ls-files --cached --others --exclude-standard -z -- '*.go')
|
||||
if ((${#go_files[@]})); then
|
||||
unformatted=$(gofmt -l -- "${go_files[@]}")
|
||||
@@ -49,6 +56,9 @@ fi
|
||||
|
||||
git diff --check HEAD --
|
||||
while IFS= read -r -d '' candidate_file; do
|
||||
if [[ ! -f "$candidate_file" ]]; then
|
||||
continue
|
||||
fi
|
||||
case "$candidate_file" in
|
||||
*.go|*.md|*.sh|go.mod|go.sum|LICENSE|.gitignore|AGENTS.md)
|
||||
if LC_ALL=C grep -nE '[[:blank:]]+$' -- "$candidate_file"; then
|
||||
|
||||
Reference in New Issue
Block a user