Skip to content

Commit b5b4b34

Browse files
committed
goreleaser working
1 parent a0ec2ad commit b5b4b34

12 files changed

Lines changed: 46 additions & 18 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ var/cache/bind
3535
var/lib/bind
3636
etc/bind/zones/db.*
3737
etc/bind/zones/*.zone
38-
tmp
38+
tmp
39+
40+
# Added by goreleaser init:
41+
dist/

.goreleaser.yaml

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,66 @@
1-
project_name: bind9-api
1+
version: 2
22

33
before:
44
hooks:
5+
# You may remove this if you don't use go modules.
56
- go mod tidy
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
69

710
builds:
8-
- id: bind9-api
9-
main: ./src/server # adjust if your main.go lives elsewhere
10-
binary: bind9-api
11-
goos: [linux, darwin, windows]
12-
goarch: [amd64, arm64]
11+
- env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- darwin
1316

1417
archives:
15-
- id: release
16-
format: tar.gz
18+
- formats: [tar.gz]
19+
# this name template makes the OS and Arch compatible with the results of `uname`.
20+
name_template: >-
21+
{{ .ProjectName }}_
22+
{{- title .Os }}_
23+
{{- if eq .Arch "amd64" }}x86_64
24+
{{- else if eq .Arch "386" }}i386
25+
{{- else }}{{ .Arch }}{{ end }}
26+
{{- if .Arm }}v{{ .Arm }}{{ end }}
27+
# use zip for windows archives
28+
format_overrides:
29+
- goos: windows
30+
formats: [zip]
1731
files:
18-
- LICENSE
19-
- README.md
20-
- config.yml
32+
- config.yaml
2133
- packaging/systemd/bind9-api.service
2234

2335
nfpms:
2436
- id: bind9-api
2537
package_name: bind9-api
26-
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
38+
maintainer: "Mahmudur Rahman <nahidacm@gmail.com>"
2739
vendor: "EpicLabs23"
2840
homepage: "https://github.com/EpicLabs23/bind9-api"
29-
maintainer: "Mahmudur Rahman <nahidacm@gmail.com>"
30-
description: "Bind9 API server built with Go"
41+
description: "Bind9 API server built with Go Gin"
3142
license: "Apache-2.0"
3243
formats: [deb, rpm]
3344
dependencies:
3445
- bind9
3546
bindir: /usr/local/bin
3647
contents:
37-
- src: ./config.yml
38-
dst: /etc/bind9-api/config.yml
48+
- src: ./config.yaml
49+
dst: /etc/bind9-api/config.yaml
3950
type: config
4051
- src: ./packaging/systemd/bind9-api.service
4152
dst: /lib/systemd/system/bind9-api.service
53+
54+
changelog:
55+
sort: asc
56+
filters:
57+
exclude:
58+
- "^docs:"
59+
- "^test:"
60+
61+
release:
62+
footer: >-
63+
64+
---
65+
66+
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
File renamed without changes.
File renamed without changes.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ services:
1515
- ./etc/bind:/etc/bind
1616
- ./var/cache/bind:/var/cache/bind
1717
- ./var/lib/bind:/var/lib/bind
18-
- ./src:/bind9-api/src
18+
- .:/bind9-api
1919
restart: always
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)