mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-02-26 00:09:11 +00:00
upd taskfiles
This commit is contained in:
parent
07ac73fbe4
commit
886c078f67
@ -1,23 +1,22 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
BIN_X32: x32-cli
|
||||
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
||||
|
||||
tasks:
|
||||
windows-amd64:
|
||||
desc: Build the x32-cli project for Windows
|
||||
cmds:
|
||||
- GOOS=windows GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_X32}}_windows_amd64.exe -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_X32}}
|
||||
internal: true
|
||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
||||
|
||||
linux-amd64:
|
||||
desc: Build the x32-cli project for Linux
|
||||
cmds:
|
||||
- GOOS=linux GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_X32}}_linux_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_X32}}
|
||||
internal: true
|
||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
||||
|
||||
darwin-amd64:
|
||||
desc: Build the x32-cli project for macOS
|
||||
cmds:
|
||||
- GOOS=darwin GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_X32}}_darwin_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_X32}}
|
||||
internal: true
|
||||
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
||||
|
||||
@ -1,23 +1,22 @@
|
||||
version: '3'
|
||||
|
||||
vars:
|
||||
BIN_XAIR: xair-cli
|
||||
WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe'
|
||||
LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64'
|
||||
MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64'
|
||||
|
||||
tasks:
|
||||
windows-amd64:
|
||||
desc: Build the xair-cli project for Windows
|
||||
cmds:
|
||||
- GOOS=windows GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_XAIR}}_windows_amd64.exe -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_XAIR}}
|
||||
internal: true
|
||||
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
||||
|
||||
linux-amd64:
|
||||
desc: Build the xair-cli project for Linux
|
||||
cmds:
|
||||
- GOOS=linux GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_XAIR}}_linux_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_XAIR}}
|
||||
internal: true
|
||||
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
||||
|
||||
darwin-amd64:
|
||||
desc: Build the xair-cli project for macOS
|
||||
cmds:
|
||||
- GOOS=darwin GOARCH=amd64 go build -o {{.BIN_DIR}}/{{.BIN_XAIR}}_darwin_amd64 -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.BIN_XAIR}}
|
||||
internal: true
|
||||
- GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}" ./cmd/{{.PROGRAM}}
|
||||
|
||||
24
Taskfile.yml
24
Taskfile.yml
@ -1,8 +1,16 @@
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
build-xair: ./Taskfile.build-xair.yml
|
||||
build-x32: ./Taskfile.build-x32.yml
|
||||
build-xair:
|
||||
taskfile: ./Taskfile.build-xair.yml
|
||||
internal: true
|
||||
vars:
|
||||
PROGRAM: xair-cli
|
||||
build-x32:
|
||||
taskfile: ./Taskfile.build-x32.yml
|
||||
internal: true
|
||||
vars:
|
||||
PROGRAM: x32-cli
|
||||
|
||||
vars:
|
||||
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
|
||||
@ -20,13 +28,11 @@ tasks:
|
||||
desc: Build the xair-cli and x32-cli projects for all platforms
|
||||
deps: [vet]
|
||||
cmds:
|
||||
- task: build-xair:windows-amd64
|
||||
- task: build-xair:linux-amd64
|
||||
- task: build-xair:darwin-amd64
|
||||
|
||||
- task: build-x32:windows-amd64
|
||||
- task: build-x32:linux-amd64
|
||||
- task: build-x32:darwin-amd64
|
||||
- for:
|
||||
matrix:
|
||||
PROGRAM: ['build-xair', 'build-x32']
|
||||
TARGET: ['windows-amd64', 'linux-amd64', 'darwin-amd64']
|
||||
task: '{{.ITEM.PROGRAM}}:{{.ITEM.TARGET}}'
|
||||
|
||||
vet:
|
||||
desc: Vet the code
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user