Skip to content

Commit

Permalink
fix(ci): update taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ccebot committed Dec 20, 2023
1 parent 48b1094 commit a183e23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ client/yarn-error.log
**/allure-results/
/test/unittest/out/
.task
.release
2 changes: 1 addition & 1 deletion .taskjob/win64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ tasks:

build_ui:
desc: build ui
dir: client
dir: ui
cmds:
- yarn install
- yarn build --dest ../client/ui
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zd",
"productName": "zd",
"version": "3.1.1",
"version": "3.2.0",
"description": "zd",
"main": ".webpack/main",
"scripts": {
Expand Down
15 changes: 5 additions & 10 deletions win64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ tasks:
compile_command_win64:
desc: compile command win64
cmds:
- GOOS=windows GOARCH=amd64 go build -ldflags {{.LDFLAGS}} -o {{.BIN_DIR}}/win64/{{.PROJECT}}.exe cmd/command/main.go
- GOOS=windows GOARCH=amd64 go build -ldflags "{{.LDFLAGS}}" -o {{.BIN_DIR}}/win64/{{.PROJECT}}.exe cmd/command/main.go

package_gui_win64_client:
desc: package gui win64 client
Expand All @@ -145,7 +145,7 @@ tasks:
compile_server_win64:
desc: compile server win64
cmds:
- GOOS=windows GOARCH=amd64 go build -ldflags {{.LDFLAGS}} -o {{.BIN_DIR}}/win64/server.exe cmd/server/main.go
- GOOS=windows GOARCH=amd64 go build -ldflags "{{.LDFLAGS}}" -o {{.BIN_DIR}}/win64/server.exe cmd/server/main.go
- rm -rf {{.CLIENT_OUT_DIR_EXECUTABLE}}/win64
- mkdir -p {{.CLIENT_OUT_DIR_EXECUTABLE}}/win64
- cp {{.BIN_DIR}}/win64/server.exe {{.CLIENT_OUT_DIR_EXECUTABLE}}/win64/server.exe
Expand All @@ -161,36 +161,31 @@ tasks:
- task: compile_launcher_win64_dep
dir: cmd/launcher
cmds:
- GOOS=windows GOARCH=amd64 go build -ldflags {{.LDFLAGS}} -o ../../{{.BIN_DIR}}/win64/{{.PROJECT}}-gui.exe
- GOOS=windows GOARCH=amd64 go build -ldflags "{{.LDFLAGS}}" -o ../../{{.BIN_DIR}}/win64/{{.PROJECT}}-gui.exe

prepare_build:
desc: prepare build
cmds:
- task: clear
- task: update_version_in_config
- task: gen_version_file
- task: prepare_res

prepare_res:
desc: prepare res
cmds:
- cp res/zh/sample.yaml demo/default.yaml

gen_version_file:
desc: gen version file
cmds:
- mkdir -p {{.QINIU_DIR}}/{{.PROJECT}}

update_version_in_config:
desc: update version in config
cmds:
- mkdir -p {{.QINIU_DIR}}/{{.PROJECT}}
- sed -i "s/Version.*/Version = {{.VERSION}}/" .zd.conf
- echo '{"version":"{{.VERSION}}"}' > {{.QINIU_DIR}}/{{.PROJECT}}/version.json
- echo '{{.VERSION}}' > {{.QINIU_DIR}}/{{.PROJECT}}/version.txt

build_ui:
desc: build ui
dir: client
dir: ui
cmds:
- yarn install
- yarn build --dest ../client/ui
Expand Down

0 comments on commit a183e23

Please sign in to comment.