diff options
author | vnugent <public@vaughnnugent.com> | 2023-08-03 21:30:36 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-08-03 21:30:36 -0400 |
commit | a5a50369250ff5c7d8f1fa53fc31ddb1da2a04a6 (patch) | |
tree | d148d7f6d19394f3627b64675ee665fb51a76745 /Module.Taskfile.yaml | |
parent | 96fc2b9f719f5c82841a93a17e9e4e2ac1f69487 (diff) |
Pre-public update
Diffstat (limited to 'Module.Taskfile.yaml')
-rw-r--r-- | Module.Taskfile.yaml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/Module.Taskfile.yaml b/Module.Taskfile.yaml new file mode 100644 index 0000000..85db3c8 --- /dev/null +++ b/Module.Taskfile.yaml @@ -0,0 +1,57 @@ +# https://taskfile.dev + +version: '3' + +vars: + INT_DIR: '{{.SCRATCH_DIR}}/obj/{{.MODULE_NAME}}/' + TARGET: '{{.OUTPUT_DIR}}/{{.HEAD_SHA}}' + MS_ARGS: '--sc false /p:RunAnalyzersDuringBuild=false /p:IntermediateOutputPath="{{.INT_DIR}}" /p:UseCommonOutputDirectory=true /p:BuildInParallel=true /p:MultiProcessorCompilation=true' + +tasks: +#called by build pipeline to sync repo + update: + dir: '{{.USER_WORKING_DIR}}' + cmds: + #force remove any local changes and overwite + - git remote update + - git reset --hard + - git pull origin {{.BRANCH_NAME}} --verify-signatures + +#called by build pipeline to build module + build: + dir: '{{.USER_WORKING_DIR}}' + cmds: + - echo "building module {{.MODULE_NAME}}" + + #re-write semver after hard reset + - dotnet-gitversion.exe /updateprojectfiles + + #build debug mode first + - task: build_debug + - task: build_release + +#called by build pipeline to clean module + clean: + dir: '{{.USER_WORKING_DIR}}' + cmds: + - echo "Cleanining {{.MODULE_NAME}}" + #clean solution + - dotnet clean /p:BuildInParallel=true /p:MultiProcessorCompilation=true + + +#Internal tasks + build_debug: + dir: '{{.USER_WORKING_DIR}}' + internal: true + cmds: + - dotnet publish -c debug -r win-x64 {{.BUILD_FLAGS}} {{.MS_ARGS}} + - dotnet publish -c debug -r linux-x64 {{.BUILD_FLAGS}} {{.MS_ARGS}} + - dotnet publish -c debug -r osx-x64 {{.BUILD_FLAGS}} {{.MS_ARGS}} + + build_release: + dir: '{{.USER_WORKING_DIR}}' + internal: true + cmds: + - dotnet publish -c release -r win-x64 {{.BUILD_FLAGS}} {{.MS_ARGS}} + - dotnet publish -c release -r linux-x64 {{.BUILD_FLAGS}} {{.MS_ARGS}} + - dotnet publish -c release -r osx-x64 {{.BUILD_FLAGS}} {{.MS_ARGS}}
\ No newline at end of file |