Skip to content

Commit dcef76c

Browse files
committed
ignore darwin/386 pair
1 parent 04822f5 commit dcef76c

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

.goreleaser.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ before:
22
hooks:
33
- go mod download
44
builds:
5-
- env:
6-
- CGO_ENABLED=0
5+
-
76
main: ./cmd/putio-sync/main.go
8-
ldflags:
9-
- -s -w -X main.Version={{.Version}}
107
goos:
11-
- linux
12-
- darwin
13-
- windows
8+
- linux
9+
- darwin
10+
- windows
1411
goarch:
15-
- "386"
16-
- amd64
12+
- "386"
13+
- amd64
14+
ignore:
15+
- goos: darwin
16+
goarch: 386
17+
env:
18+
- CGO_ENABLED=0
1719
archives:
1820
- format: tar.gz
1921
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"

cmd/putio-sync/main.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ import (
1515
putiosync "github.com/putdotio/putio-sync/v2"
1616
)
1717

18-
// Version of client. Set during build.
19-
// "0.0.0" is the development version.
20-
var Version = "0.0.0"
18+
// These variables are set by goreleaser on build.
19+
var (
20+
version = "0.0.0"
21+
commit = ""
22+
date = ""
23+
)
2124

2225
// TODO HTTP API
2326
// TODO websocket endpoint for progress updates
@@ -73,7 +76,7 @@ func main() {
7376
var err error
7477
flag.Parse()
7578
if *versionFlag {
76-
fmt.Println(Version)
79+
fmt.Printf("%s (%s) [%s]", version, commit, date)
7780
return
7881
}
7982
if *debugFlag {

0 commit comments

Comments
 (0)