From 62b80184cf4f27f1c19fe8e3dfed77c407a9b7bc Mon Sep 17 00:00:00 2001 From: Kemal Akkoyun Date: Sat, 11 Apr 2020 10:52:12 +0200 Subject: [PATCH] Fix generation issues --- .drone.yml | 7 ++++++- Makefile | 3 ++- README.md | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 16a8ee6f..ee2c4429 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,6 +10,11 @@ clone: depth: 50 steps: +# This is needed for the tags. And the tags are needed to determine version. +- name: fetch + image: docker:git + commands: + - git fetch --tags - name: configure-buckets image: minio/mc:RELEASE.2018-09-26T00-42-43Z commands: @@ -52,7 +57,7 @@ steps: image: golang:1.14.1-alpine3.11 commands: - apk add --update make git - - make generate + - env -i make PATH=$PATH HOME=$HOME PWD=$PWD GOPATH=$GOPATH generate - git diff --exit-code - name: rebuild-cache diff --git a/Makefile b/Makefile index e2b5f8b4..10bbb759 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ ROOT_DIR := $(CURDIR) SCRIPTS := $(ROOT_DIR)/scripts -VERSION := $(strip $(shell [ -d .git ] && git describe --always --tags --dirty)) +VERSION := $(strip $(shell [ -d .git ] && git describe --abbrev=0)) +LONG_VERSION := $(strip $(shell [ -d .git ] && git describe --always --tags --dirty)) BUILD_DATE := $(shell date -u +"%Y-%m-%dT%H:%M:%S%Z") VCS_REF := $(strip $(shell [ -d .git ] && git rev-parse HEAD)) diff --git a/README.md b/README.md index 56a9c186..0aaa3af6 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ USAGE: drone-cache [global options] command [command options] [arguments...] VERSION: - v1.1.0-rc0-5-g63b3af3-dirty + v1.1.0-rc0 COMMANDS: help, h Shows a list of commands or help for one command