@@ -57,6 +57,15 @@ GO_BUILD_VER?=v0.16
57
57
# we do not need to use the arch since go-build:v0.15 now is multi-arch manifest
58
58
CALICO_BUILD =calico/go-build:$(GO_BUILD_VER )
59
59
60
+ # Figure out version information. To support builds from release tarballs, we default to
61
+ # <unknown> if this isn't a git checkout.
62
+ GIT_COMMIT: =$(shell git rev-parse HEAD || echo '<unknown>')
63
+ BUILD_ID: =$(shell git rev-parse HEAD || uuidgen | sed 's/-//g')
64
+ GIT_DESCRIPTION: =$(shell git describe --tags || echo '<unknown>')
65
+
66
+ # Calculate a timestamp for any build artefacts.
67
+ DATE: =$(shell date -u +'% FT% T% z')
68
+
60
69
# Linker flags for building Typha.
61
70
#
62
71
# We use -X to insert the version information into the placeholder variables
@@ -70,15 +79,6 @@ LDFLAGS:=-ldflags "\
70
79
-X $(PACKAGE_NAME ) /pkg/buildinfo.GitRevision=$(GIT_COMMIT ) \
71
80
-B 0x$(BUILD_ID ) "
72
81
73
- # Figure out version information. To support builds from release tarballs, we default to
74
- # <unknown> if this isn't a git checkout.
75
- GIT_COMMIT: =$(shell git rev-parse HEAD || echo '<unknown>')
76
- BUILD_ID: =$(shell git rev-parse HEAD || uuidgen | sed 's/-//g')
77
- GIT_DESCRIPTION: =$(shell git describe --tags || echo '<unknown>')
78
-
79
- # Calculate a timestamp for any build artefacts.
80
- DATE: =$(shell date -u +'% FT% T% z')
81
-
82
82
# List of Go files that are generated by the build process. Builds should
83
83
# depend on these, clean removes them.
84
84
GENERATED_GO_FILES: =
@@ -231,7 +231,7 @@ sub-push-%:
231
231
tag-images : imagetag
232
232
docker tag $(CONTAINER_NAME ) :latest-$(ARCH ) $(CONTAINER_NAME ) :$(IMAGETAG ) -$(ARCH )
233
233
docker tag $(CONTAINER_NAME ) :latest-$(ARCH ) quay.io/$(CONTAINER_NAME ) :$(IMAGETAG ) -$(ARCH )
234
-
234
+
235
235
# Tag images for gcr.io, used by GKE.
236
236
docker tag $(CONTAINER_NAME):latest-$(ARCH) gcr.io/projectcalico-org/$(CONTAINER_NAME):$(IMAGETAG)
237
237
docker tag $(CONTAINER_NAME):latest-$(ARCH) eu.gcr.io/projectcalico-org/$(CONTAINER_NAME):$(IMAGETAG)
@@ -485,4 +485,4 @@ help:
485
485
@echo " ARCH (target): $( ARCH) "
486
486
@echo " BUILDARCH (host): $( BUILDARCH) "
487
487
@echo " CALICO_BUILD: $( CALICO_BUILD) "
488
- @echo " -----------------------------------------"
488
+ @echo " -----------------------------------------"
0 commit comments