Skip to content

Commit

Permalink
build: update build commands and add new tasks for packaging and buil…
Browse files Browse the repository at this point in the history
…ding

- Change the build command for the server from `zt-server` to `ztf-server`
- Add a new task to package the GUI client
- Modify the build command for the CLI to use `ztf` instead of `ztf-server`
- Add a new task to build the CLI
- Add a new task with specific variables for the build_cli task

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Mar 21, 2024
1 parent 99fe67e commit a95965c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ tasks:
desc: Build the server
run: once
cmds:
- GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.GOOS}}/{{.GOARCH}}/zt-server{{if eq .GOOS "windows"}}.exe{{end}} cmd/server/main.go
- GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.GOOS}}/{{.GOARCH}}/ztf-server{{if eq .GOOS "windows"}}.exe{{end}} cmd/server/main.go
status:
- test -f {{.BUILD_DIR}}/{{.GOOS}}/{{.GOARCH}}/zt-server{{if eq .GOOS "windows"}}.exe{{end}}
- test -f {{.BUILD_DIR}}/{{.GOOS}}/{{.GOARCH}}/ztf-server{{if eq .GOOS "windows"}}.exe{{end}}

package_gui_client:
desc: start package gui
Expand All @@ -72,8 +72,11 @@ tasks:

build_cli:
desc: Build the CLI
run: once
cmds:
- echo "Packaging the GUI for {{.GOOS}} {{.GOARCH}}"
- GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.GOOS}}/{{.GOARCH}}/ztf{{if eq .GOOS "windows"}}.exe{{end}} cmd/command/main.go
status:
- test -f {{.BUILD_DIR}}/{{.GOOS}}/{{.GOARCH}}/ztf{{if eq .GOOS "windows"}}.exe{{end}}

default:
cmds:
Expand All @@ -88,3 +91,8 @@ tasks:
GOOS: darwin,
GOARCH: arm64
}
- task: build_cli
vars: {
GOOS: darwin,
GOARCH: arm64
}

0 comments on commit a95965c

Please sign in to comment.