File tree Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is an example .goreleaser.yml file with some sensible defaults.
2
+ # Make sure to check the documentation at https://goreleaser.com
3
+ version : 2
4
+ builds :
5
+ - dir : ./node-registrar
6
+ env :
7
+ - CGO_ENABLED=0
8
+ goos :
9
+ - linux
10
+ - windows
11
+ - darwin
12
+ binary : tfregistrar
13
+ id : tfregistrar
14
+
15
+ ignore :
16
+ - goos : windows
17
+ ldflags :
18
+ - -X github.com/threefoldtech/tfgrid4-sdk-go/node-registrar/cmd.version={{.Tag}}
19
+ - -X github.com/threefoldtech/tfgrid-sdk-go/node-registrar/cmd.commit={{.Commit}}
20
+
21
+
22
+ archives :
23
+ - format : tar.gz
24
+ # this name template makes the OS and Arch compatible with the results of uname.
25
+ name_template : >-
26
+ {{ .ProjectName }}_
27
+ {{- title .Os }}_
28
+ {{- if eq .Arch "amd64" }}x86_64
29
+ {{- else if eq .Arch "386" }}i386
30
+ {{- else }}{{ .Arch }}{{ end }}
31
+ {{- if .Arm }}v{{ .Arm }}{{ end }}
32
+ # use zip for windows archives
33
+ format_overrides :
34
+ - goos : windows
35
+ format : zip
36
+ checksum :
37
+ name_template : " checksums.txt"
38
+ snapshot :
39
+ version_template : " {{ incpatch .Version }}-next"
40
+ changelog :
41
+ sort : asc
42
+ filters :
43
+ exclude :
44
+ - " ^docs:"
45
+ - " ^test:"
46
+ # The lines beneath this are called `modelines`. See `:help modeline`
47
+ # Feel free to remove those if you don't want/use them.
48
+ # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
49
+ # vim: set ts=2 sw=2 tw=0 fo=cnqoj
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -ex
4
+
5
+ if [ -z ${VERSION+x} ]
6
+ then
7
+ echo ' Error! $VERSION is required.'
8
+ exit 64
9
+ fi
10
+
11
+ echo $VERSION
12
+
13
+ goreleaser check
14
+ goreleaser release --snapshot --clean
15
+
16
+ tag_and_push () {
17
+ local component=" $1 "
18
+ git tag -a " $component /$VERSION " -m " release $component /$VERSION "
19
+ git push origin $component /$VERSION
20
+ }
21
+
22
+
23
+ # # main
24
+ git tag -a $VERSION -m " release $VERSION "
25
+ git push origin $VERSION
You can’t perform that action at this time.
0 commit comments