diff --git a/bin/build b/bin/build index e43d2c0..325d37b 100755 --- a/bin/build +++ b/bin/build @@ -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 diff --git a/docs/releases/v0.19.1.md b/docs/releases/v0.19.1.md index dddeaba..4694fa4 100644 --- a/docs/releases/v0.19.1.md +++ b/docs/releases/v0.19.1.md @@ -1,7 +1,7 @@ --- title: v0.19.1 type: release -weight: 19000 +weight: 19001 --- **Internal** diff --git a/docs/releases/v0.19.2.md b/docs/releases/v0.19.2.md new file mode 100644 index 0000000..c4bac3a --- /dev/null +++ b/docs/releases/v0.19.2.md @@ -0,0 +1,9 @@ +--- +title: v0.19.2 +type: release +weight: 19002 +--- + +**Bug Fix** + + * Re-release without `+dirty` version annotation.