From 417188af50144573b08273f6fb753813057f6a6f Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sun, 21 Feb 2016 11:06:41 +0100 Subject: [PATCH] Make the builds reproducable based on commit sha --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e717d01..0dc93e2 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,9 @@ EXECUTABLE ?= drone-terraform IMAGE ?= plugins/$(EXECUTABLE) +COMMIT ?= $(shell git rev-parse --short HEAD) -LDFLAGS = -X "main.buildDate=$(shell date -u '+%Y-%m-%d %H:%M:%S %Z')" +LDFLAGS = -X "main.buildCommit=$(COMMIT)" PACKAGES = $(shell go list ./... | grep -v /vendor/) all: deps build test