127 lines
3.0 KiB
YAML
127 lines
3.0 KiB
YAML
# 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"
|
|
|
|
#### Variables to get version ####
|
|
VERSION:
|
|
sh: cd version/ && versionManager go version
|
|
|
|
#### Variable HOME of user ####
|
|
HOME:
|
|
sh: echo $HOME
|
|
|
|
#### Binary name of kode-creator ####
|
|
WINDOWS_BINARY_NAME: ./release/windows/{{.VERSION}}/kode-creator.exe
|
|
LINUX_BINARY_NAME: ./release/linux/{{.VERSION}}/kode-creator
|
|
|
|
# faire un build pour Windows sur linux il faut installer mingw-w64
|
|
# sudo apt-get install mingw-w64
|
|
# ** Cette fonctionnalité est toujours en cours de test **
|
|
# env:
|
|
# GOOS: windows
|
|
# GOARCH: amd64
|
|
|
|
tasks:
|
|
######### L I N U X S E C T I O N ##########
|
|
# # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
#### Version Manager ####
|
|
## Make sure you have PATH the versionManager !!!
|
|
1.0-linux-version-build:
|
|
cmds:
|
|
- "cd ./version/ && versionManager go build"
|
|
1.1-linux-version-patch:
|
|
cmds:
|
|
- "cd ./version/ && versionManager go patch"
|
|
1.2-linux-version-minor:
|
|
cmds:
|
|
- "cd ./version/ && versionManager go minor"
|
|
1.3-linux-version-major:
|
|
cmds:
|
|
- "cd ./version/ && versionManager go major"
|
|
|
|
#### Build ####
|
|
2.0-linux-build:
|
|
cmds:
|
|
- "{{.GOBUILD}} {{.LINUX_BINARY_NAME}} -v"
|
|
|
|
#### change Build, patch, minor or major version and BUILD ####
|
|
3.0-linux-vbuild:
|
|
cmds:
|
|
- task: 1.0-linux-version-build
|
|
- task: 2.0-linux-build
|
|
3.1-linux-vpatch:
|
|
cmds:
|
|
- task: 1.1-linux-version-patch
|
|
- task: 2.0-linux-build
|
|
3.2-linux-vminor:
|
|
cmds:
|
|
- task: 1.2-linux-version-minor
|
|
- task: 2.0-linux-build
|
|
3.3-linux-vmajor:
|
|
cmds:
|
|
- task: 1.3-linux-version-major
|
|
- task: 2.0-linux-build
|
|
|
|
#### install on LINUX OS ####
|
|
4.0-linux-install:
|
|
cmds:
|
|
- "cp {{.LINUX_BINARY_NAME}} {{.HOME}}/dev/outils/kode-creator/"
|
|
- "chmod +x {{.HOME}}/dev/outils/kode-creator/kode-creator"
|
|
- "cp ./config.yml {{.HOME}}/dev/outils/kode-creator/"
|
|
|
|
#### LINUX - Build ==> Install ####
|
|
5.0-LINUX-bi:
|
|
cmds:
|
|
- task: 3.0-linux-vbuild
|
|
- task: 4.0-linux-install
|
|
5.1-LINUX-pi:
|
|
cmds:
|
|
- task: 3.1-linux-vpatch
|
|
- task: 4.0-linux-install
|
|
5.2-LINUX-mini:
|
|
cmds:
|
|
- task: 3.2-linux-vminor
|
|
- task: 4.0-linux-install
|
|
5.3-LINUX-maji:
|
|
cmds:
|
|
- task: 3.3-linux-vmajor
|
|
- task: 4.0-linux-install
|
|
|
|
|
|
######### W I N D O W S S E C T I O N ##########
|
|
# # # # # # # # # # # # # # # # # # # # # # # # # # #
|
|
|
|
## Make sure you have PATH the versionManager.exe !!!
|
|
windows-version:
|
|
cmds:
|
|
- "cd ./version/ && versionManager.exe go build"
|
|
# silent: true
|
|
|
|
windows-build:
|
|
cmds:
|
|
- "{{.GOBUILD}} {{.WINDOWS_BINARY_NAME}} -v"
|
|
# silent: true
|
|
|
|
## change Build version and build
|
|
windows-vbuild:
|
|
cmds:
|
|
- task: windows-version
|
|
- task: windows-build
|
|
|
|
|
|
|
|
|
|
|