From 4aff294739abe23e03b9b488fe623dc3c65c0a3b Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 7 Jul 2020 11:37:55 -0700 Subject: [PATCH] Set overrided version in drone config --- .drone.yml | 4 ++++ Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 924982f..b3c7117 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,6 +6,8 @@ steps: - name: test image: golang:1.12 + environment: + VERSION: ${DRONE_TAG:-${DRONE_COMMIT}} commands: - make build - make test @@ -47,6 +49,8 @@ trigger: steps: - name: build all binaries image: golang:1.12 + environment: + VERSION: ${DRONE_TAG:-${DRONE_COMMIT}} commands: - make all-linux diff --git a/Makefile b/Makefile index 6b80e8f..0c4372f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ DOCKER_TAG ?= minitor-go-${USER} -export VERSION := $(shell git describe --tags --dirty) +VERSION ?= $(shell git describe --tags --dirty) GOFILES = *.go # Multi-arch targets are generated from this TARGET_ALIAS = minitor-linux-amd64 minitor-linux-arm minitor-linux-arm64 minitor-darwin-amd64