From a1c0fa73de52ac13912668107c4a46074bea682d Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 18 Nov 2016 10:58:36 +0800 Subject: [PATCH] update get commit number from latest tag. Signed-off-by: Bo-Yi Wu --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 02100c1..47d8ab1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -.PHONY: install build test html update docker_build docker_image docker_deploy clean +.PHONY: install build test html update docker_build docker_image docker_deploy clean version -VERSION := $(shell git describe --tags || git rev-parse --short HEAD) +VERSION := $(shell git describe --tags --always || git rev-parse --short HEAD) DEPLOY_ACCOUNT := "appleboy" DEPLOY_IMAGE := "drone-telegram" @@ -43,3 +43,6 @@ endif clean: rm -rf coverage.txt ${DEPLOY_IMAGE} + +version: + @echo $(VERSION)