When doing git-clone to a subdir, do not keep tags, since there can be local
tags affecting `git describe` and buildvcs info. Instead pull the tags from
upstream.
Collect artifacts in "tmp-..." instead of final place. If build fails in the
middle, we don't want to leave the artifacts directory with partial result.
Also remove the build directory (with Git clone) in the end.
Create a temporary directory inside loop/ directory and make a clone of Git repo
to that dir. This ensures that the version built is exactly what is committed
without any unstaged files and not dirty.
To test "make docker-release" it is convenient to pass a regular commit to it
(an output of `git describe`). In this commit release.sh is changed to detect
such "tags" and skip tag signature verification for it.
Also if release.sh is used without an argument, a unique directory name is
generated from the current time.
A commit_hash component was added to the version string:
"loop version 0.31.2-beta commit=v0.31.2-beta-dirty commit_hash=xxx".
As .* is greedy, it captured "0.31.2-beta commit=v0.31.2-beta-dirty"
instead of just "0.31.2-beta".
This commit fixes this.