Don't tag as dirty build when only go.mod or sum changes

This commit is contained in:
stack72 2020-04-01 12:18:06 +01:00
parent 1f8754b3e9
commit 7c1105a8b5
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ EXACT=0
# as we've seen cases in Travis where not doing so causes git to
# treat the worktree as dirty when it is not.
git update-index -q --refresh
if ! git diff-files --quiet; then
if ! git diff-files -- . ':!**/go.mod' ':!**/go.sum' --quiet; then
DIRTY_TAG="dirty"
fi

View file

@ -2,7 +2,7 @@
$ErrorActionPreference="Stop"
git update-index -q --refresh
git diff-files --quiet | Out-Null
git diff-files -- . ':!**/go.mod' ':!**/go.sum' --quiet | Out-Null
$dirty=($LASTEXITCODE -ne 0)