Skip to content

Commit 9b0d904

Browse files
committed
add goreleaser
1 parent 1aa32d4 commit 9b0d904

File tree

241 files changed

+31766
-11105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+31766
-11105
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.idea
1+
.idea
2+
dist

.goreleaser.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
before:
2+
hooks:
3+
- go mod download
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
goos:
8+
- linux
9+
- darwin
10+
- windows
11+
goarch:
12+
- amd64
13+
archive:
14+
replacements:
15+
darwin: Darwin
16+
linux: Linux
17+
windows: Windows
18+
amd64: x86_64
19+
checksum:
20+
name_template: 'checksums.txt'
21+
snapshot:
22+
name_template: "{{ .Tag }}"
23+
changelog:
24+
sort: asc
25+
filters:
26+
exclude:
27+
- '^docs:'
28+
- '^test:'

Gopkg.lock

Lines changed: 0 additions & 126 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 42 deletions
This file was deleted.

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,23 @@ dep:
1818

1919
# Cross compilation
2020
build-linux:
21-
env GOOS=linux GOARCH=amd64 go build -o ${BINARY_NAME}-linux-amd64
21+
env GOOS=linux \
22+
GOARCH=amd64 \
23+
go build \
24+
-o ${BINARY_NAME}-linux-amd64
2225
build-darwin:
23-
env GOOS=darwin GOARCH=amd64 go build -o ${BINARY_NAME}-darwin-amd64
26+
env GOOS=darwin \
27+
GOARCH=amd64 \
28+
go build \
29+
-o ${BINARY_NAME}-darwin-amd64
2430
build-windows:
25-
env GOOS=windows GOARCH=amd64 go build -o ${BINARY_NAME}-windows-amd64
31+
env GOOS=windows \
32+
GOARCH=amd64 \
33+
go build \
34+
-o ${BINARY_NAME}-windows-amd64
2635

36+
release-dry:
37+
goreleaser release --rm-dist --snapshot --skip-publish
38+
39+
release:
40+
goreleaser release --rm-dist

dist/checksums.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
9e8c8fbd0e9c131aba1144bc24a65c7e400c94d66e8d258fa6eead2cd6897f76 dns_v0.0.1_Linux_x86_64.tar.gz
2+
ced8e7a7d756b6ef165c5643cb49c0c78199ba88666e687c341eb91ffbd7a4e9 dns_v0.0.1_Windows_x86_64.tar.gz
3+
e84e00872323daec7affbf189bed4b57b0699cd473206e74143f3bbb4d3fe416 dns_v0.0.1_Darwin_x86_64.tar.gz

dist/config.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
project_name: dns
2+
release:
3+
github:
4+
owner: mxssl
5+
name: dns
6+
name_template: '{{.Tag}}'
7+
brew:
8+
name: dns
9+
commit_author:
10+
name: goreleaserbot
11+
email: goreleaser@carlosbecker.com
12+
install: bin.install "dns"
13+
scoop:
14+
name: dns
15+
commit_author:
16+
name: goreleaserbot
17+
email: goreleaser@carlosbecker.com
18+
url_template: https://github.com/mxssl/dns/releases/download/{{ .Tag }}/{{ .ArtifactName
19+
}}
20+
builds:
21+
- goos:
22+
- linux
23+
- darwin
24+
- windows
25+
goarch:
26+
- amd64
27+
goarm:
28+
- "6"
29+
targets:
30+
- linux_amd64
31+
- darwin_amd64
32+
- windows_amd64
33+
main: .
34+
ldflags:
35+
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
36+
binary: dns
37+
env:
38+
- CGO_ENABLED=0
39+
lang: go
40+
archive:
41+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
42+
}}v{{ .Arm }}{{ end }}'
43+
replacements:
44+
amd64: x86_64
45+
darwin: Darwin
46+
linux: Linux
47+
windows: Windows
48+
format: tar.gz
49+
files:
50+
- licence*
51+
- LICENCE*
52+
- license*
53+
- LICENSE*
54+
- readme*
55+
- README*
56+
- changelog*
57+
- CHANGELOG*
58+
nfpm:
59+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
60+
}}v{{ .Arm }}{{ end }}'
61+
bindir: /usr/local/bin
62+
snapcraft:
63+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
64+
}}v{{ .Arm }}{{ end }}'
65+
snapshot:
66+
name_template: '{{ .Tag }}'
67+
checksum:
68+
name_template: checksums.txt
69+
algorithm: sha256
70+
changelog:
71+
filters:
72+
exclude:
73+
- '^docs:'
74+
- '^test:'
75+
sort: asc
76+
dist: dist
77+
sign:
78+
cmd: gpg
79+
args:
80+
- --output
81+
- $signature
82+
- --detach-sig
83+
- $artifact
84+
signature: ${artifact}.sig
85+
artifacts: none
86+
env_files:
87+
github_token: ~/.config/goreleaser/github_token
88+
before:
89+
hooks:
90+
- go mod download
91+
github_urls:
92+
download: https://github.com

dist/darwin_amd64/dns

9.3 MB
Binary file not shown.
3.54 MB
Binary file not shown.
3.38 MB
Binary file not shown.

0 commit comments

Comments
 (0)