File tree 2 files changed +12
-21
lines changed
2 files changed +12
-21
lines changed Original file line number Diff line number Diff line change 1
- # The lines below are called `modelines`. See `:help modeline`
2
- # Feel free to remove those if you don't want/need to use them.
3
- # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
4
- # vim: set ts=2 sw=2 tw=0 fo=cnqoj
1
+ version : 2
5
2
6
- version : 1
7
- dist : " .dist"
3
+ dist : .dist
8
4
9
5
before :
10
6
hooks :
11
- # You may remove this if you don't use go modules.
12
- - go mod tidy
13
- # you may remove this if you don't need go generate
14
- # - go generate ./...
7
+ - go mod download
15
8
16
9
builds :
17
10
- id : gop
11
+ main : ./cmd/gop
12
+ binary : bin/gop
13
+ ldflags :
14
+ - -X github.com/goplus/gop/env.buildVersion=v{{.Version}}
15
+ - -X github.com/goplus/gop/env.buildDate={{.Date}}
18
16
env :
19
17
- CGO_ENABLED=0
20
18
goos :
21
19
- linux
22
20
- windows
23
21
- darwin
24
- main : ./cmd/gop
25
- binary : bin/gop
26
- ldflags :
27
- - -X github.com/goplus/gop/env.buildVersion=v{{.Version}}
28
- - -X github.com/goplus/gop/env.buildDate={{.Date}}
29
22
30
23
archives :
31
24
- format : tar.gz
32
- # this name template makes the OS and Arch compatible with the results of `uname`.
33
25
name_template : >-
34
- {{ .ProjectName }}{{.Version}}.{{ .Os }}-{{ .Arch }}
35
- {{- if .Arm }}v{{ .Arm }}{{ end }}
36
- # use zip for windows archives
26
+ {{.ProjectName}}{{.Version}}.{{.Os}}-{{.Arch}}
27
+ {{- if .Arm}}v{{.Arm}}{{end}}
37
28
format_overrides :
38
29
- goos : windows
39
30
format : zip
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ RUN set -eux; \
13
13
BIN_DIR_SUFFIX=linux_$GOARCH; \
14
14
[ $GOARCH = "amd64" ] && BIN_DIR_SUFFIX=${BIN_DIR_SUFFIX}_v1; \
15
15
[ $GOARCH = "arm" ] && BIN_DIR_SUFFIX=${BIN_DIR_SUFFIX}_$(go env GOARM | cut -d , -f 1); \
16
- cp .dist/gop_$BIN_DIR_SUFFIX/bin/gop .dist/gopfmt_$BIN_DIR_SUFFIX/bin/gopfmt $GOPROOT/bin/; \
16
+ cp .dist/gop_$BIN_DIR_SUFFIX/bin/gop $GOPROOT/bin/; \
17
17
else \
18
18
./all.bash; \
19
- cp bin/gop bin/gopfmt $GOPROOT/bin/; \
19
+ cp bin/gop $GOPROOT/bin/; \
20
20
fi
21
21
22
22
FROM $BASE_IMAGE
You can’t perform that action at this time.
0 commit comments