forked from devops-rob/target-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
124 lines (115 loc) · 3.86 KB
/
Copy path.goreleaser.yaml
File metadata and controls
124 lines (115 loc) · 3.86 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
version: 2
before:
hooks:
- go mod tidy
- rm -rf completions manpages
- mkdir completions manpages
- rm -rf completions
- mkdir completions
- sh -c 'go run . completion "bash" >./completions/{{ .ProjectName }}.bash'
- sh -c 'go run . completion "zsh" >./completions/{{ .ProjectName }}.zsh'
- sh -c 'go run . completion "fish" >./completions/{{ .ProjectName }}.fish'
- sh -c 'go run . man | gzip -c >./manpages/{{ .ProjectName }}.1.gz'
builds:
- id: default
env:
- CGO_ENABLED=0
main: .
binary: baoctx
ldflags:
- -s
- -w
- -X main.Version={{ .Version }}
- -X main.Commit={{ .Commit }}
flags:
- -trimpath
goos:
- linux
- darwin
goarch:
- amd64
- arm64
archives:
- id: default
name_template: "baoctx-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}-{{ .Mips }}{{ end }}"
ids:
- default
wrap_in_directory: true
files:
- LICENSE
- README.md
- completions/*
- manpages/*
checksum:
name_template: "checksums.txt"
nfpms:
- file_name_template: "baoctx-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}-{{ .Mips }}{{ end }}"
vendor: adfinis
homepage: "https://github.com/adfinis/baoctx"
maintainer: "jonahz <jonah.zuercher@adfinis.com>"
description: "A CLI tool to manage context profiles for OpenBao"
license: "Apache-2.0"
formats:
- deb
- rpm
- archlinux
contents:
- src: ./completions/{{ .ProjectName }}.bash
dst: /etc/bash_completion.d/{{ .ProjectName }}
- src: ./completions/{{ .ProjectName }}.fish
dst: /usr/share/fish/vendor_completions.d/{{ .ProjectName }}.fish
- src: ./completions/{{ .ProjectName }}.zsh
dst: /usr/share/zsh/site-functions/_{{ .ProjectName }}
- src: ./manpages/{{ .ProjectName }}.1.gz
dst: /usr/share/man/man1/{{ .ProjectName }}-cli.1.gz
aurs:
- name: "baoctx-bin"
homepage: "https://github.com/adfinis/baoctx"
description: "A CLI tool to manage context profiles for OpenBao"
maintainers:
- "jonahz <jonah.zuercher@adfinis.com>"
license: "Apache-2.0"
private_key: "{{ .Env.AUR_KEY }}"
git_url: "ssh://aur@aur.archlinux.org/baoctx-bin.git"
package: |-
cd ./{{ .ProjectName }}-v{{ .Version }}-linux-amd64
# bin
install -Dm755 "./{{ .ProjectName }}" "${pkgdir}/usr/bin/{{ .ProjectName }}"
# license
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/{{ .ProjectName }}/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./completions/{{ .ProjectName }}.bash" "${pkgdir}/usr/share/bash-completion/completions/{{ .ProjectName }}"
install -Dm644 "./completions/{{ .ProjectName }}.zsh" "${pkgdir}/usr/share/zsh/site-functions/_{{ .ProjectName }}"
install -Dm644 "./completions/{{ .ProjectName }}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/{{ .ProjectName }}.fish"
# manpages
install -Dm644 "./manpages/{{ .ProjectName }}.1.gz" "${pkgdir}/usr/share/man/man1/{{ .ProjectName }}-cli.1.gz"
# readme
mkdir -pv "${pkgdir}/usr/share/doc/{{ .ProjectName }}/"
install -Dm644 README* "${pkgdir}/usr/share/doc/{{ .ProjectName }}/"
snapshot:
version_template: "{{ incpatch .Version }}-devel"
changelog:
sort: asc
use: github
filters:
exclude:
- "^docs:"
- "^test:"
groups:
- title: "New Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 10
- title: Others
order: 999
sboms:
- id: default
artifacts: archive
- id: package
artifacts: package