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