Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #34 from l0nax/feature/30_version_strip_debug_gore…
Browse files Browse the repository at this point in the history
…leaser

Add new Fields to `goreleaser`
  • Loading branch information
rimusz authored Oct 15, 2019
2 parents 764ff4a + 7cadfe5 commit 14a337c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
12 changes: 8 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ builds:
- windows
goarch:
- amd64
archive:
format: tar.gz
files:
- LICENSE
flags:
- -tags 'strip_debug'
archives:
- format: tar.gz
name_template: "kubenab_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
checksum:
name_template: 'checksums.txt'
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ build:
git fetch --tags
@echo "++ Building kubenab go binary..."
mkdir -p bin
cd cmd/kubenab && go build $(STRIP_DEBUG) -a --installsuffix cgo --ldflags="-s -X main.AppVersion=$(APP_VERSION) -X main.BuildDate=$(BUILD_DATE) -X main.GitHash=$(GIT_HASH)" -o $(OUT_DIR)/kubenab
cd cmd/kubenab && go build $(STRIP_DEBUG) -a --installsuffix cgo --ldflags="-s -X main.version=$(APP_VERSION) -X main.date=$(BUILD_DATE) -X main.commit=$(GIT_HASH)" -o $(OUT_DIR)/kubenab
2 changes: 1 addition & 1 deletion cmd/kubenab/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var (

func main() {
// print Version Informations
log.Printf("Starting kubenab version %s - %s - %s", AppVersion, BuildDate, GitHash)
log.Printf("Starting kubenab version %s - %s - %s", version, date, commit)

// check if all required Flags are set and in a correct Format
checkArguments()
Expand Down
6 changes: 3 additions & 3 deletions cmd/kubenab/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
// This File contains only the Version Informations about `kubenab`

var (
AppVersion = "** NOT SET **" // Contains a SemVer Version
BuildDate = "** NOT SET **" // Contains the UTC Build Time
GitHash = "** NOT SET **" // Contains the SHA1 Hash of the last Commit
version = "** NOT SET **" // Contains a SemVer Version
date = "** NOT SET **" // Contains the UTC Build Time
commit = "** NOT SET **" // Contains the SHA1 Hash of the last Commit
)

0 comments on commit 14a337c

Please sign in to comment.