Skip to content
This repository was archived by the owner on Mar 15, 2024. It is now read-only.

Commit c1e855c

Browse files
author
Michael Weber
committed
fix goreleaser options for tagged case
1 parent 7bdf155 commit c1e855c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.circleci/config.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
name: Release
4949
command: |
5050
export GOVERSION=$(go version | awk '{sub("^go","",$3);print $3;}')
51-
scripts/goreleaser --rm-dist --skip-publish ${CIRCLE_TAG:-"--snapshot"}
51+
[ -n "$CIRCLE_TAG" ] || tagargs="--snapshot"
52+
scripts/goreleaser --rm-dist --skip-publish $tagargs
5253
rm -rf $(find ./dist/* -type d) || true
5354
- store_test_results:
5455
path: test-results/
@@ -82,8 +83,8 @@ jobs:
8283
name: "Publish Release on GitHub"
8384
command: |
8485
go get github.com/tcnksm/ghr
85-
VERSION=$(echo artifacts/vault-plugin-splunk_*_*.zip | awk -F_ '{print $2;exit;}')
86-
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -recreate ${VERSION} ./artifacts/
86+
TAG=v$(echo artifacts/vault-plugin-splunk_*_*.zip | awk -F_ '{print $2;exit;}')
87+
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -recreate ${TAG} ./artifacts/
8788
8889
workflows:
8990
version: 2

0 commit comments

Comments
 (0)