CircleCI - run goreleaser

This commit is contained in:
stefanprodan
2019-06-21 15:29:38 +03:00
parent 2973822113
commit 240591a6b8
3 changed files with 33 additions and 1 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ jobs:
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run: curl -sL http://git.io/goreleaser | bash
- run: test/goreleaser.sh --skip-validate --skip-publish
e2e-istio-testing:
machine: true
+4
View File
@@ -12,5 +12,9 @@ archive:
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
changelog:
filters:
exclude:
- '^CircleCI'
snapshot:
name_template: SNAPSHOT-{{.Commit}}
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
set -e
TAR_FILE="/tmp/goreleaser.tar.gz"
RELEASES_URL="https://github.com/goreleaser/goreleaser/releases"
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
last_version() {
curl -sL -o /dev/null -w %{url_effective} "$RELEASES_URL/latest" |
rev |
cut -f1 -d'/'|
rev
}
download() {
test -z "$VERSION" && VERSION="$(last_version)"
test -z "$VERSION" && {
echo "Unable to get goreleaser version." >&2
exit 1
}
rm -f "$TAR_FILE"
curl -s -L -o "$TAR_FILE" \
"$RELEASES_URL/download/$VERSION/goreleaser_$(uname -s)_$(uname -m).tar.gz"
}
download
tar -xf "$TAR_FILE" -C "$TMPDIR"
"${TMPDIR}/goreleaser" "$@"