Skip to content

Commit a829e57

Browse files
rscgopherbot
authored andcommitted
cmd/buildlet: use same VERSION for all builds in 'make compile' or 'make upload'
As written before, the shell command was re-executed for each make recipe, producing a different date for each build. This is closer to what upload was doing before, but not as useful as everything having the same version for the same make invocation. Do that instead. Change-Id: I3b4366060d88c90ea9626458de63e25a4ab1f8cc Reviewed-on: https://go-review.googlesource.com/c/build/+/420799 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Russ Cox <[email protected]> Auto-Submit: Russ Cox <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 1ad6583 commit a829e57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/buildlet/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ clean:
7575
# Compile everything without uploading.
7676
compile: $(ALL)
7777

78-
GOFILES=$(shell ls *.go)
78+
GOFILES:=$(shell ls *.go)
7979

80-
VERSION=$(USER)-$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
80+
VERSION:=$(USER)-$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
8181

8282
BUILD=CGO_ENABLED=0 $(GO) build -ldflags='-X main.Version=$(VERSION)' -o
8383

0 commit comments

Comments
 (0)