From 5aa833e2ca4573bc4b92069b463954934c24d685 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 7 Feb 2026 04:24:58 +0000 Subject: [PATCH] add separate taskfiles for x32,xair builds --- Taskfile.build-x32.yml | 23 +++++++++++++++++++++++ Taskfile.build-xair.yml | 23 +++++++++++++++++++++++ Taskfile.yml | 41 +++++++++++++---------------------------- 3 files changed, 59 insertions(+), 28 deletions(-) create mode 100644 Taskfile.build-x32.yml create mode 100644 Taskfile.build-xair.yml diff --git a/Taskfile.build-x32.yml b/Taskfile.build-x32.yml new file mode 100644 index 0000000..4709688 --- /dev/null +++ b/Taskfile.build-x32.yml @@ -0,0 +1,23 @@ +version: '3' + +vars: + BIN_X32: x32-cli + +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 + + 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 + + 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 diff --git a/Taskfile.build-xair.yml b/Taskfile.build-xair.yml new file mode 100644 index 0000000..649bf95 --- /dev/null +++ b/Taskfile.build-xair.yml @@ -0,0 +1,23 @@ +version: '3' + +vars: + BIN_XAIR: xair-cli + +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 + + 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 + + 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 diff --git a/Taskfile.yml b/Taskfile.yml index 8941e9b..a2b6b58 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,29 +1,32 @@ version: '3' +includes: + build-xair: ./Taskfile.build-xair.yml + build-x32: ./Taskfile.build-x32.yml + vars: - PROGRAM: xair-cli SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}' BIN_DIR: bin VERSION: sh: 'git describe --tags $(git rev-list --tags --max-count=1)' - WINDOWS: '{{.BIN_DIR}}/{{.PROGRAM}}_windows_amd64.exe' - LINUX: '{{.BIN_DIR}}/{{.PROGRAM}}_linux_amd64' - MACOS: '{{.BIN_DIR}}/{{.PROGRAM}}_darwin_amd64' - tasks: default: - desc: Build the xair-cli project + desc: Build the xair-cli and x32-cli projects for all platforms cmds: - task: build build: - desc: Build the xair-cli project + desc: Build the xair-cli and x32-cli projects for all platforms deps: [vet] cmds: - - task: build-windows - - task: build-linux - - task: build-macos + - 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 vet: desc: Vet the code @@ -36,24 +39,6 @@ tasks: cmds: - go fmt ./... - build-windows: - desc: Build the xair-cli project for Windows - cmds: - - GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}" - internal: true - - build-linux: - desc: Build the xair-cli project for Linux - cmds: - - GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}" - internal: true - - build-macos: - desc: Build the xair-cli project for macOS - cmds: - - GOOS=darwin GOARCH=amd64 go build -o {{.MACOS}} -ldflags="-X main.version={{.VERSION}}" - internal: true - test: desc: Run tests cmds: