mirror of
https://github.com/onyx-and-iris/gogn.git
synced 2026-03-29 21:49:11 +00:00
fix inject version
This commit is contained in:
parent
f47d917cff
commit
5983f286d1
@ -8,8 +8,8 @@ vars:
|
|||||||
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
||||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
||||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
||||||
GIT_COMMIT:
|
VERSION:
|
||||||
sh: git log -n 1 --format=%h
|
sh: 'git describe --tags $(git rev-list --tags --max-count=1)'
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
default:
|
default:
|
||||||
@ -39,19 +39,19 @@ tasks:
|
|||||||
build-windows:
|
build-windows:
|
||||||
desc: Build the gogn project for Windows
|
desc: Build the gogn project for Windows
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.GIT_COMMIT}}"
|
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}"
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
desc: Build the gogn project for Linux
|
desc: Build the gogn project for Linux
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.GIT_COMMIT}}"
|
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}"
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
desc: Build the gogn project for macOS
|
desc: Build the gogn project for macOS
|
||||||
cmds:
|
cmds:
|
||||||
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.GIT_COMMIT}}"
|
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}"
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user