2023-06-24 02:00:53 -04:00
|
|
|
# https://taskfile.dev
|
|
|
|
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
# Variables
|
|
|
|
vars:
|
|
|
|
## Commands Go ##
|
|
|
|
GOCMD: go
|
|
|
|
GOBUILD: "{{.GOCMD}} build -o"
|
|
|
|
GORUN: "{{.GOCMD}} run"
|
|
|
|
GOTEST: "{{.GOCMD}} test -v"
|
|
|
|
GOCOVER: "{{.GOCMD}} test -v --cover"
|
2023-06-30 14:17:21 -04:00
|
|
|
|
|
|
|
# Variables to get version
|
2023-06-30 10:09:01 -04:00
|
|
|
VERSION:
|
|
|
|
sh: cd version/ && versionManager go version
|
2023-06-24 02:00:53 -04:00
|
|
|
|
2023-06-30 15:25:39 -04:00
|
|
|
## Binary name of kode-creator ##
|
|
|
|
WINDOWS_BINARY_NAME: ./release/windows/{{.VERSION}}/kode-creator.exe
|
|
|
|
LINUX_BINARY_NAME: ./release/linux/{{.VERSION}}/kode-creator
|
2023-06-24 02:00:53 -04:00
|
|
|
|
2023-06-30 14:17:21 -04:00
|
|
|
# faire un build pour Windows sur linux il faut installer mingw-w64
|
|
|
|
# sudo apt-get install mingw-w64
|
2023-06-30 15:25:39 -04:00
|
|
|
# ** Cette fonctionnalité est toujours en cours de test **
|
|
|
|
# env:
|
|
|
|
# GOOS: windows
|
|
|
|
# GOARCH: amd64
|
2023-06-24 02:00:53 -04:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
###### LINUX ######
|
|
|
|
## Make sure you have PATH the versionManager !!!
|
|
|
|
linux-version:
|
|
|
|
cmds:
|
|
|
|
- "cd ./version/ && versionManager go build"
|
2023-06-30 14:17:21 -04:00
|
|
|
# silent: true
|
2023-06-24 02:00:53 -04:00
|
|
|
|
|
|
|
## Build ##
|
|
|
|
linux-build:
|
|
|
|
cmds:
|
|
|
|
- "{{.GOBUILD}} {{.LINUX_BINARY_NAME}} -v"
|
|
|
|
# silent: true
|
|
|
|
|
|
|
|
## change Build version and build
|
|
|
|
linux-vbuild:
|
|
|
|
cmds:
|
|
|
|
- task: linux-version
|
|
|
|
- task: linux-build
|
|
|
|
|
|
|
|
|
|
|
|
###### WINDOWS ######
|
|
|
|
## Make sure you have PATH the versionManager.exe !!!
|
|
|
|
windows-version:
|
|
|
|
cmds:
|
|
|
|
- "cd ./version/ && versionManager.exe go build"
|
2023-06-30 14:17:21 -04:00
|
|
|
# silent: true
|
2023-06-24 02:00:53 -04:00
|
|
|
|
|
|
|
windows-build:
|
|
|
|
cmds:
|
|
|
|
- "{{.GOBUILD}} {{.WINDOWS_BINARY_NAME}} -v"
|
2023-06-30 14:17:21 -04:00
|
|
|
# silent: true
|
2023-06-24 02:00:53 -04:00
|
|
|
|
|
|
|
## change Build version and build
|
|
|
|
windows-vbuild:
|
|
|
|
cmds:
|
|
|
|
- task: windows-version
|
|
|
|
- task: windows-build
|
|
|
|
|
|
|
|
|
|
|
|
|