From: Ian Lance Taylor Date: Tue, 30 Jan 2018 04:35:43 +0000 (-0800) Subject: bootstrap.bash: only fetch git revision if we need it X-Git-Tag: go1.10rc2~2^2~27 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=32a08d09b8285e0d5a5457225c499950746b9aed;p=gostls13.git bootstrap.bash: only fetch git revision if we need it Updates #22912 Fixes #23610 Change-Id: Id1c91fc3f040412d5931dba40e430685793f8eea Reviewed-on: https://go-review.googlesource.com/90715 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/bootstrap.bash b/src/bootstrap.bash index 7b4f57461f..32b736ad78 100755 --- a/src/bootstrap.bash +++ b/src/bootstrap.bash @@ -77,7 +77,11 @@ else rm -rf "pkg/${gohostos}_${gohostarch}" "pkg/tool/${gohostos}_${gohostarch}" fi -GITREV=$(git rev-parse --short HEAD) +if [ "$BOOTSTRAP_FORMAT" = "mintgz" ]; then + # Fetch git revision before rm -rf .git. + GITREV=$(git rev-parse --short HEAD) +fi + rm -rf pkg/bootstrap pkg/obj .git # Support for building minimal tar.gz for the builders.