forked from dragonflyoss/nydus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoreleaser.sh
More file actions
119 lines (109 loc) · 2.43 KB
/
Copy pathgoreleaser.sh
File metadata and controls
119 lines (109 loc) · 2.43 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
#!/bin/bash
GOOS=$(go env GOOS)
if [ -z "$GOARCH" ]; then
GOARCH=$(go env GOARCH)
echo "GOARCH is not set, use GOARCH=$GOARCH"
fi
cat <<EOF > .goreleaser.yml
version: 2
release:
draft: true
replace_existing_draft: true
before:
hooks:
- go mod download
builds:
- main: contrib/goreleaser/main.go
id: nydusify
binary: nydusify
goos:
- $GOOS
goarch:
- $GOARCH
env:
- CGO_ENABLED=0
hooks:
post:
- cp nydus-static/{{ .Name }} dist/{{ .Name }}_{{ .Target }}/{{ .Name }}
- main: contrib/goreleaser/main.go
id: nydus-overlayfs
binary: nydus-overlayfs
goos:
- $GOOS
goarch:
- $GOARCH
env:
- CGO_ENABLED=0
hooks:
post:
- cp nydus-static/{{ .Name }} dist/{{ .Name }}_{{ .Target }}/{{ .Name }}
- main: contrib/goreleaser/main.go
id: nydus-image
binary: nydus-image
goos:
- $GOOS
goarch:
- $GOARCH
env:
- CGO_ENABLED=0
hooks:
post:
- cp nydus-static/{{ .Name }} dist/{{ .Name }}_{{ .Target }}/{{ .Name }}
- main: contrib/goreleaser/main.go
id: nydusctl
binary: nydusctl
goos:
- $GOOS
goarch:
- $GOARCH
env:
- CGO_ENABLED=0
hooks:
post:
- cp nydus-static/{{ .Name }} dist/{{ .Name }}_{{ .Target }}/{{ .Name }}
- main: contrib/goreleaser/main.go
id: nydusd
binary: nydusd
goos:
- $GOOS
goarch:
- $GOARCH
env:
- CGO_ENABLED=0
hooks:
post:
- cp nydus-static/{{ .Name }} dist/{{ .Name }}_{{ .Target }}/{{ .Name }}
archives:
- name_template: "nydus-static-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
formats: ["zip"]
checksum:
name_template: "checksums-{{ .Version }}-$GOOS-$GOARCH.txt"
snapshot:
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
nfpms:
- id: nydus-static
maintainer: Nydus Maintainers <dragonfly-maintainers@googlegroups.com>
file_name_template: "nydus-static-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
package_name: nydus-static
description: Static binaries of Nydus, designed for building and mounting Nydus images.
license: "Apache 2.0"
bindir: /usr/bin
ids:
- nydusify
- nydus-overlayfs
- nydus-image
- nydusctl
- nydusd
formats:
- rpm
- deb
contents:
- src: nydus-static/configs
dst: /etc/nydus/configs
EOF