-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
73 lines (65 loc) · 1.6 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
version: 2
source:
enabled: true
name_template: "{{ .ProjectName }}-{{ .Version }}"
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- binary: "{{ tolower .ProjectName }}"
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- "386"
- amd64
- arm
- arm64
goarm:
- "6"
- "7"
ldflags:
- -s -w -X github.com/hibare/GoS3Backup/internal/version.CurrentVersion={{.Version}}
universal_binaries:
- replace: true
name_template: "{{ tolower .ProjectName }}"
nfpms:
- id: nfpms
package_name: "gos3backup"
file_name_template: >-
{{- trimsuffix .ConventionalFileName .ConventionalExtension -}}
{{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}}
{{- if not (eq .Amd64 "v1")}}{{ .Amd64 }}{{ end -}}
{{- .ConventionalExtension -}}
vendor: Hibare.
homepage: https://github.com/hibare/GoS3Backup
maintainer: Hibare <[email protected]>.
description: |-
Software to perform daily backups to S3.
formats:
- deb
- rpm
bindir: /usr/bin
contents:
- src: scripts/gos3backup.service
dst: /etc/systemd/system/gos3backup.service
scripts:
postinstall: "scripts/postinstall.sh"
preremove: "scripts/preremove.sh"
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
publishers:
- name: fury.io
ids:
- nfpms
dir: "{{ dir .ArtifactPath }}"
cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/hibare/