From b5ed3ea2a3ab2ed2e02626b376bed833f91122a9 Mon Sep 17 00:00:00 2001 From: Christopher Kaster Date: Mon, 30 Mar 2020 11:23:05 +0200 Subject: [PATCH] ignore snap.login, do not rely on custom git vars anymore --- .gitignore | 1 + .goreleaser.yml | 4 ++-- .travis.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ffd8cda..5800baf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /crab* /main* /dist +/snap.login # Created by https://www.gitignore.io/api/go,linux,macos,windows,intellij+all,visualstudiocode # Edit at https://www.gitignore.io/?templates=go,linux,macos,windows,intellij+all,visualstudiocode diff --git a/.goreleaser.yml b/.goreleaser.yml index daa6801..c43e4b8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,8 +1,8 @@ builds: - main: ./cmd/crab/main.go ldflags: - - -X github.com/atomicptr/crab/pkg/meta.Version={{.Env.GIT_VERSION}} - - -X github.com/atomicptr/crab/pkg/meta.GitCommit={{.Env.GIT_COMMIT}} + - -X github.com/atomicptr/crab/pkg/meta.Version={{.Version}} + - -X github.com/atomicptr/crab/pkg/meta.GitCommit={{.FullCommit}} env: - CGO_ENABLED=0 goos: diff --git a/.travis.yml b/.travis.yml index 9523377..67697aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ after_success: deploy: - provider: script skip_cleanup: true - script: GIT_COMMIT=$(git rev-list -1 HEAD) GIT_VERSION=$(git --no-pager tag --points-at HEAD | head -n 1) curl -sL https://git.io/goreleaser | bash + script: curl -sL https://git.io/goreleaser | bash on: tags: true condition: "$TRAVIS_OS_NAME = linux"