From d3c7ed256f95f6eb0855134cf04bb52a8de71616 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sun, 24 Oct 2021 02:15:38 +0800 Subject: [PATCH] fix: no git in docker --- .drone.yml | 1 + release.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e1f1233..f91a751 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,6 +5,7 @@ steps: - name: build image: golang commands: + - git tag $DRONE_TAG - bash release.sh cmd/configui/main.go - name: gitea_release diff --git a/release.sh b/release.sh index c5c30a1..b372e29 100755 --- a/release.sh +++ b/release.sh @@ -1,6 +1,10 @@ + VERSION=$(git describe --tags --abbrev=0) +if [ $? -ne 0 ]; then VERSION=$DRONE_TAG; fi BUILD=$(git rev-parse --short HEAD) -PROJ=$(basename "$(pwd)") +if [ $? -ne 0 ]; then BUILD=${DRONE_COMMIT:0:7}; fi + +PROJ=configui HUB=hub.kumoly.io HUB_PROJECT=tools DIST=dist