Skip to content

Commit 282fb2d

Browse files
authored
Merge pull request #1936 from goplus/main
ci
2 parents f209578 + 9ff7b67 commit 282fb2d

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

.goreleaser.yaml

+10-19
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
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
52

6-
version: 1
7-
dist: ".dist"
3+
dist: .dist
84

95
before:
106
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
158

169
builds:
1710
- 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}}
1816
env:
1917
- CGO_ENABLED=0
2018
goos:
2119
- linux
2220
- windows
2321
- 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}}
2922

3023
archives:
3124
- format: tar.gz
32-
# this name template makes the OS and Arch compatible with the results of `uname`.
3325
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}}
3728
format_overrides:
3829
- goos: windows
3930
format: zip

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ RUN set -eux; \
1313
BIN_DIR_SUFFIX=linux_$GOARCH; \
1414
[ $GOARCH = "amd64" ] && BIN_DIR_SUFFIX=${BIN_DIR_SUFFIX}_v1; \
1515
[ $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/; \
1717
else \
1818
./all.bash; \
19-
cp bin/gop bin/gopfmt $GOPROOT/bin/; \
19+
cp bin/gop $GOPROOT/bin/; \
2020
fi
2121

2222
FROM $BASE_IMAGE

0 commit comments

Comments
 (0)