From 515943cc42cf9480eecc159f17c45743769a9d54 Mon Sep 17 00:00:00 2001 From: Ray Allan Date: Thu, 16 Feb 2023 18:38:55 +0000 Subject: [PATCH] Revert "Merge pull request #105 from aws/dev" This reverts commit 13a9b8de6bbcbeab9624a66b4c7ad7008f02bcb6, reversing changes made to a04bd6ecae16f6b2bc2957e3cafbf365c0710b19. --- Makefile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 1f3ffb7..a0db556 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,6 @@ LOCAL_IPAM_PLUGIN_BINARY=bin/plugins/ecs-ipam LOCAL_BRIDGE_PLUGIN_BINARY=bin/plugins/ecs-bridge VERSION=$(shell cat $(ROOT)/VERSION) GO_EXECUTABLE=$(shell command -v go 2> /dev/null) -GO_VERSION=`go version | cut -d' ' -f3 | cut -c 3-` # We want to embed some git details in the build. We support pulling # these details from the environment in order support builds outside @@ -26,15 +25,6 @@ ifeq ($(strip $(GIT_PORCELAIN)),) GIT_PORCELAIN=1 endif -# buildvcs=false excludes version control information in golang >= 1.18. -# This is required for compiling agent with included repositories -ifeq ($(shell expr $(GO_VERSION) \>= 1.18), 1) - BUILD_VCS := -buildvcs=false -else - # leaving BUILD_VCS empty as it is not required for golang < 1.18. - BUILD_VCS := -endif - .PHONY: get-deps get-deps: @@ -47,7 +37,7 @@ get-deps: plugins: $(LOCAL_ENI_PLUGIN_BINARY) $(LOCAL_IPAM_PLUGIN_BINARY) $(LOCAL_BRIDGE_PLUGIN_BINARY) $(LOCAL_ENI_PLUGIN_BINARY): $(SOURCES) - GOOS=linux CGO_ENABLED=0 go build $(BUILD_VCS) -installsuffix cgo -a -ldflags "\ + GOOS=linux CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "\ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.GitShortHash=$(GIT_SHORT_HASH) \ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.GitPorcelain=$(GIT_PORCELAIN) \ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.Version=$(VERSION) -s" \ @@ -55,7 +45,7 @@ $(LOCAL_ENI_PLUGIN_BINARY): $(SOURCES) @echo "Built eni plugin" $(LOCAL_IPAM_PLUGIN_BINARY): $(SOURCES) - GOOS=linux CGO_ENABLED=0 go build $(BUILD_VCS) -installsuffix cgo -a -ldflags "\ + GOOS=linux CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "\ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.GitShortHash=$(GIT_SHORT_HASH) \ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.GitPorcelain=$(GIT_PORCELAIN) \ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.Version=$(VERSION) -s" \ @@ -63,7 +53,7 @@ $(LOCAL_IPAM_PLUGIN_BINARY): $(SOURCES) @echo "Built ipam plugin" $(LOCAL_BRIDGE_PLUGIN_BINARY): $(SOURCES) - GOOS=linux CGO_ENABLED=0 go build $(BUILD_VCS) -installsuffix cgo -a -ldflags "\ + GOOS=linux CGO_ENABLED=0 go build -installsuffix cgo -a -ldflags "\ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.GitShortHash=$(GIT_SHORT_HASH) \ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.GitPorcelain=$(GIT_PORCELAIN) \ -X github.com/aws/amazon-ecs-cni-plugins/pkg/version.Version=$(VERSION) -s" \