fix goreleaser bugs

Signed-off-by: Steve Kriss <steve@heptio.com>
This commit is contained in:
Steve Kriss
2018-10-30 09:00:11 -06:00
parent beb22f953b
commit d6162e943b
2 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -36,9 +36,9 @@ builds:
- goos: windows
goarch: arm64
ldflags:
- -X "github.com/heptio/ark/pkg/buildinfo.Version={{ .Version }}" -X "github.com/heptio/ark/pkg/buildinfo.GitSHA={{ .Env.GIT_SHA }}" -X "github.com/heptio/ark/pkg/buildinfo.GitTreeState={{ .Env.GIT_TREE_STATE }}"
- -X "github.com/heptio/ark/pkg/buildinfo.Version={{ .Tag }}" -X "github.com/heptio/ark/pkg/buildinfo.GitSHA={{ .Env.GIT_SHA }}" -X "github.com/heptio/ark/pkg/buildinfo.GitTreeState={{ .Env.GIT_TREE_STATE }}"
archive:
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
files:
- LICENSE
- examples/**/*
+13 -13
View File
@@ -18,15 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail
# $PUBLISH must explicitly be set to 'true' for goreleaser
# to publish the release to GitHub.
if [ "${PUBLISH:-}" != "true" ]; then
SKIP_PUBLISH="--skip-publish"
else
SKIP_PUBLISH=""
fi
if [ -z "${GITHUB_TOKEN}" ]; then
if [[ -z "${GITHUB_TOKEN}" ]]; then
echo "GITHUB_TOKEN must be set"
exit 1
fi
@@ -46,7 +38,15 @@ else
export GIT_TREE_STATE=dirty
fi
goreleaser release \
--rm-dist \
--release-notes="${RELEASE_NOTES_FILE}" \
"${SKIP_PUBLISH}"
# $PUBLISH must explicitly be set to 'true' for goreleaser
# to publish the release to GitHub.
if [[ "${PUBLISH:-}" != "true" ]]; then
goreleaser release \
--rm-dist \
--release-notes="${RELEASE_NOTES_FILE}" \
--skip-publish
else
goreleaser release \
--rm-dist \
--release-notes="${RELEASE_NOTES_FILE}"
fi