File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 55 tags :
66 - ' v*'
77
8+ branches :
9+ - master
10+
811jobs :
912 build-binary :
1013 strategy :
@@ -16,17 +19,21 @@ jobs:
1619 - os : ubuntu-latest
1720 goos : linux
1821 platform : linux
22+
1923 - os : macos-13
2024 goos : darwin
2125 platform : darwin
26+
2227 - os : macos-14
2328 goos : darwin
2429 platform : darwin
2530 exclude :
2631 - os : macos-14
2732 arch : amd64
33+
2834 - os : macos-13
2935 arch : arm64
36+
3037 name : Building fwatcher-${{ matrix.platform }}-${{ matrix.arch }}
3138 runs-on : ${{ matrix.os }}
3239 steps :
Original file line number Diff line number Diff line change 88 cmds :
99 - go run .
1010
11- dev:build :
12- cmds :
13- - go build -ldflags "-s -w -X main.Version={{.version}}" -o ./bin/{{.name}}
14-
1511 build :
1612 requires :
1713 vars :
1814 - version
1915 vars :
2016 upx : ' {{.upx | default "false"}}'
2117 binary : ' {{.binary | default .name }}'
18+ date_str :
19+ sh : " date '+%T %p (%Z) | %a %b %d, %Y'"
20+ version_str : " [{{.version }}] built at {{.date_str}}"
2221 env :
2322 GOOS : ' {{ .GOOS }}'
2423 GOARCH : ' {{ .GOARCH }}'
2524 cmds :
2625 - echo "building binary for ${GOOS:-$(go env GOOS)} (${GOARCH:-$(go env GOARCH)})"
27- - go build -ldflags "-s -w -X main.Version={{.version}}" -o ./bin/{{.binary}}
26+ - echo version str "{{.version_str}}"
27+ - go build -ldflags '-s -w -X "main.Version={{.version_str}}"' -o ./bin/{{.binary}}
2828 - |+
2929 if [[ "{{.upx}}" = "true" ]]; then
3030 upx ./bin/{{.binary}}
You can’t perform that action at this time.
0 commit comments