mirror of
https://github.com/golang/go.git
synced 2026-02-01 16:42:04 +03:00
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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user