-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.goreleaser.yaml
90 lines (80 loc) · 2.21 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
80
81
82
83
84
85
86
87
88
89
90
# Make sure to check the documentation at https://goreleaser.com
version: 2
env:
- GIT_URL=https://github.com/huhu415/uaProxy
- TZ=Asia/Shanghai
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- "386"
- amd64
- arm
- arm64
- loong64 # 龙芯
- mips # 32位的大端序MIPS处理器
- mipsle # 32位的小端序MIPS处理器
- mips64 # 64位的大端序MIPS处理器
- mips64le # 64位的小端序MIPS处理器
- ppc64 # 64位的大端序PowerPC处理器
- ppc64le # 64位的小端序PowerPC处理器
- riscv64
flags:
- -trimpath
ldflags:
- -s -w
- -X uaProxy/bootstrap.Version={{.Version}}
- -X uaProxy/bootstrap.BuildDate={{.Date}}
- -X uaProxy/bootstrap.GitCommit={{.Commit}}
archives:
- format: tar.gz
wrap_in_directory: true # wrap the archive in a directory named after the project
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
- shell
nfpms:
- id: uaproxy-ipk
package_name: uaproxy
file_name_template: "{{ .ProjectName }}_openwrt_{{ .Arch }}"
vendor: huhu415
homepage: https://github.com/huhu415/uaProxy
maintainer: huhu415 <[email protected]>
description: UA Proxy Service
license: MIT
formats:
- ipk
contents:
- src: ./shell/uaProxy.procd
dst: /etc/init.d/
type: config
file_info:
mode: 0755 # rwxr-xr-x 权限
scripts:
preinstall: "shell/ipk/postinstall.sh"
postinstall: "shell/ipk/postinstall.sh"
preremove: "shell/ipk/preremove.sh"
postremove: "shell/ipk/postremove.sh"
checksum:
name_template: "checksums.txt"
# https://goreleaser.com/customization/changelog/
changelog:
disable: true
# https://goreleaser.com/customization/release
release:
header: |
## 🥳Changes
- 增加了对OpenWrt的ipk安装方法
```sh
tar -xzvf uaProxy-linux-xxxxxxx.tar.gz # 解压
```
footer: |
**[FAQ](assets/FAQ.md)**