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

Commit 752994a

Browse files
authored
🛠goreleaser setting version with ldflags (#12)
1 parent d8b54f6 commit 752994a

File tree

2 files changed

+30
-32
lines changed

2 files changed

+30
-32
lines changed

‎.goreleaser.yml

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,45 @@ before:
77
# you may remove this if you don't need go generate
88
- go get -v
99
builds:
10-
-
11-
12-
env:
13-
- CGO_ENABLED=0
14-
ldflags:
15-
- -s -w
16-
goos:
17-
- darwin
18-
- linux
19-
- windows
20-
goarch:
21-
- 386
22-
- amd64
23-
ignore:
24-
- goos: darwin
25-
goarch: 386
10+
- env:
11+
- CGO_ENABLED=0
12+
ldflags:
13+
- -s -w -X main.VERSION={{.Version}}
14+
goos:
15+
- darwin
16+
- linux
17+
- windows
18+
goarch:
19+
- 386
20+
- amd64
21+
ignore:
22+
- goos: darwin
23+
goarch: 386
2624
archives:
27-
- replacements:
28-
darwin: Darwin
29-
linux: Linux
30-
amd64: x86_64
25+
- replacements:
26+
darwin: Darwin
27+
linux: Linux
28+
amd64: x86_64
3129
checksum:
3230
name_template: 'checksums.txt'
3331
snapshot:
34-
name_template: "{{ .Tag }}"
32+
name_template: '{{ .Tag }}'
3533
changelog:
3634
sort: asc
3735
filters:
3836
exclude:
39-
- '^docs:'
40-
- '^test:'
37+
- '^docs:'
38+
- '^test:'
4139
release:
4240
github:
4341
owner: athul
4442
name: pwcli
4543
brews:
46-
- name: pwcli
47-
github:
48-
owner: athul
49-
name: homebrew-tap
50-
folder: Formula
51-
homepage: "https://github.com/athul/pwcli"
52-
description: "Postwoman CLI in Go"
53-
install: bin.install "pwcli"
44+
- name: pwcli
45+
github:
46+
owner: athul
47+
name: homebrew-tap
48+
folder: Formula
49+
homepage: 'https://github.com/athul/pwcli'
50+
description: 'Postwoman CLI in Go'
51+
install: bin.install "pwcli"

‎cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

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

1616
func main() {
1717
app := cli.NewApp()

0 commit comments

Comments
 (0)