ci: tolerate checkout line-ending normalization

This commit is contained in:
Qiufeng
2026-08-18 19:40:28 +08:00
parent 2712c5b8c1
commit 806f1bd9b4
+3 -1
View File
@@ -32,7 +32,9 @@ jobs:
./scripts/check-semver.sh "$VERSION"
GITEA_SHA=$(git rev-parse HEAD)
test "$(git rev-parse "refs/tags/$GITEA_REF_NAME^{commit}")" = "$GITEA_SHA"
test -z "$(git status --porcelain --untracked-files=all)"
test -z "$(git ls-files --others --exclude-standard)"
git diff --quiet --ignore-space-at-eol --ignore-cr-at-eol \
|| { printf 'Release checkout has non-whitespace tracked changes:\n' >&2; git diff --stat >&2; exit 1; }
{
printf 'version=%s\n' "$VERSION"
printf 'ref=%s\n' "$GITEA_REF_NAME"