Skip to content

Commit

Permalink
Add debug and strict build checks
Browse files Browse the repository at this point in the history
For some reason, v0.19.1 is marked as dirty although have not been
able to reproduce. Adding stricter behavior + debug in case it
happens again.
  • Loading branch information
dpb587 committed Jul 16, 2020
1 parent ba6392d commit 31bee09
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
19 changes: 17 additions & 2 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,26 @@ if [ -z "${arch_list:-}" ]; then
arch_list="amd64"
fi

mkdir -p tmp
commit=$( git rev-parse HEAD | cut -c-10 )

if [[ $( git clean -dnx | wc -l ) -gt 0 ]] ; then
commit="${commit}+dirty"

commit=$( git rev-parse HEAD | cut -c-10 )$( git diff-index --quiet HEAD -- || echo "+dirty" )
if [[ "${version}" != "0.0.0" ]]; then
echo "ERROR: building an official version requires a clean repository"
echo "WARN: refusing to clean repository"
git clean -dnx

exit 1
fi
fi

mkdir -p tmp

built=$( date -u +%Y-%m-%dT%H:%M:%S+00:00 )

echo "building ${version} (commit ${commit}; built ${built})"

export CGO_ENABLED=0

for cli in $cli_list ; do
Expand Down
2 changes: 1 addition & 1 deletion docs/releases/v0.19.1.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: v0.19.1
type: release
weight: 19000
weight: 19001
---

**Internal**
Expand Down
9 changes: 9 additions & 0 deletions docs/releases/v0.19.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: v0.19.2
type: release
weight: 19002
---

**Bug Fix**

* Re-release without `+dirty` version annotation.

0 comments on commit 31bee09

Please sign in to comment.