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

Commit

Permalink
đŸ› goreleaser setting version with ldflags (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmor authored Feb 14, 2020
1 parent d8b54f6 commit 752994a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 32 deletions.
60 changes: 29 additions & 31 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,45 @@ before:
# you may remove this if you don't need go generate
- go get -v
builds:
-

env:
- CGO_ENABLED=0
ldflags:
- -s -w
goos:
- darwin
- linux
- windows
goarch:
- 386
- amd64
ignore:
- goos: darwin
goarch: 386
- env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.VERSION={{.Version}}
goos:
- darwin
- linux
- windows
goarch:
- 386
- amd64
ignore:
- goos: darwin
goarch: 386
archives:
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
name_template: '{{ .Tag }}'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^docs:'
- '^test:'
release:
github:
owner: athul
name: pwcli
brews:
- name: pwcli
github:
owner: athul
name: homebrew-tap
folder: Formula
homepage: "https://github.com/athul/pwcli"
description: "Postwoman CLI in Go"
install: bin.install "pwcli"
- name: pwcli
github:
owner: athul
name: homebrew-tap
folder: Formula
homepage: 'https://github.com/athul/pwcli'
description: 'Postwoman CLI in Go'
install: bin.install "pwcli"
2 changes: 1 addition & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// VERSION is set by `make` during the build to the most recent tag
var VERSION = "v0.0.4"
var VERSION = ""

func main() {
app := cli.NewApp()
Expand Down

0 comments on commit 752994a

Please sign in to comment.