diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e1f54ba..0e308265 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.goreleaser.yml b/.goreleaser.yml index dcf3d925..03d56489 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,5 +12,9 @@ archive: name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" files: - none* +changelog: + filters: + exclude: + - '^CircleCI' snapshot: name_template: SNAPSHOT-{{.Commit}} \ No newline at end of file diff --git a/test/goreleaser.sh b/test/goreleaser.sh new file mode 100755 index 00000000..41a30578 --- /dev/null +++ b/test/goreleaser.sh @@ -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" "$@"