Skip to content

Commit

Permalink
build*: use --always with git describe
Browse files Browse the repository at this point in the history
git describe --dirty can fail in some cases without --always. This can
cause travis to fail.
  • Loading branch information
Andrew Jeddeloh committed May 30, 2019
1 parent c94d59a commit 068764c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export GOFLAGS=-mod=vendor

if [ -z ${VERSION+a} ]; then
echo "Using version from git..."
VERSION=$(git describe --dirty)
VERSION=$(git describe --dirty --always)
fi

GLDFLAGS+="-X github.com/coreos/ignition/v2/internal/version.Raw=${VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion build_releases
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GLDFLAGS=${GLDFLAGS:-}

if [ -z ${VERSION+a} ]; then
echo "Using version from git..."
VERSION=$(git describe --dirty)
VERSION=$(git describe --dirty --always)
fi

GLDFLAGS+="-X github.com/coreos/ignition/v2/internal/version.Raw=${VERSION}"
Expand Down

0 comments on commit 068764c

Please sign in to comment.