Commit 32a08d09 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 14f8027a
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment