Skip to content

Commit

Permalink
Update Taskfile for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Jan 17, 2022
1 parent bc8b8c3 commit b354103
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Taskfile.yml
@@ -1,5 +1,9 @@
version: '3'

vars:
BINARY_EXT:
sh: echo '{{if eq OS "windows"}}.exe{{end}}'

tasks:
web:
desc: Build the binary and start the web server.
Expand All @@ -16,7 +20,7 @@ tasks:
-X "{{.PKG_PATH}}.BuildCommit={{.BUILD_COMMIT}}"
'
-tags '{{.TAGS}}'
-trimpath -o gogs
-trimpath -o gogs{{.BINARY_EXT}}
vars:
PKG_PATH: gogs.io/gogs/internal/conf
BUILD_TIME:
Expand Down Expand Up @@ -60,7 +64,7 @@ tasks:
cmds:
- rm -rf {{.RELEASE_GOGS}}
- mkdir -p {{.RELEASE_GOGS}}
- cp -r gogs LICENSE README.md README_ZH.md scripts {{.RELEASE_GOGS}}
- cp -r gogs{{.BINARY_EXT}} LICENSE README.md README_ZH.md scripts {{.RELEASE_GOGS}}
- cd {{.RELEASE_ROOT}} && zip -r gogs.$(NOW).zip "gogs"
vars:
RELEASE_ROOT: release
Expand Down

0 comments on commit b354103

Please sign in to comment.