-
Notifications
You must be signed in to change notification settings - Fork 12
/
.goreleaser.yaml
79 lines (78 loc) · 2.03 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
74
75
76
77
78
79
version: 2
before:
hooks:
- go mod tidy
builds:
- id: yukid
binary: yukid
env:
- CGO_ENABLED=0
main: ./cmd/yukid
goos:
- linux
goarch:
- amd64
flags:
- -trimpath
ldflags:
- -s -w -X github.com/ustclug/Yuki/pkg/info.Version={{.Version}} -X github.com/ustclug/Yuki/pkg/info.BuildDate={{.Date}} -X github.com/ustclug/Yuki/pkg/info.GitCommit={{.Commit}}
- id: yukictl
binary: yukictl
env:
- CGO_ENABLED=0
main: ./cmd/yukictl
goos:
- linux
goarch:
- amd64
flags:
- -trimpath
ldflags:
- -s -w -X github.com/ustclug/Yuki/pkg/info.Version={{.Version}} -X github.com/ustclug/Yuki/pkg/info.BuildDate={{.Date}} -X github.com/ustclug/Yuki/pkg/info.GitCommit={{.Commit}}
hooks:
post:
- cmd: sh -c "{{ .Path }} completion bash > bash_completion"
dir: "{{ dir (dir .Path) }}"
output: true
archives:
- format: binary
name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
use: github-native
nfpms:
- id: default
package_name: yuki
homepage: https://github.com/ustclug/Yuki
maintainer: "USTC LUG <[email protected]>"
description: |-
USTC Mirror Manager
formats:
- deb
umask: 0o022
dependencies:
- "docker.io | docker-engine | docker-ce"
section: admin
priority: extra
provides:
- yukid
- yukictl
scripts:
postinstall: etc/postinst.sh
preremove: etc/prerm.sh
contents:
- src: dist/bash_completion
dst: /etc/bash_completion.d/yukictl
- src: etc/daemon.example.toml
dst: /etc/yuki/
- src: etc/yukid.service
dst: /lib/systemd/system/
- src: yukictl
dst: /usr/bin/yuki
type: symlink
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj