diff options
author | vnugent <public@vaughnnugent.com> | 2024-01-20 23:49:29 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-01-20 23:49:29 -0500 |
commit | 6cb7da37824d02a1898d08d0f9495c77fde4dd1d (patch) | |
tree | 95e37ea3c20f416d6a205ee4ab050c307b18eafe /back-end/Taskfile.yaml |
inital commit
Diffstat (limited to 'back-end/Taskfile.yaml')
-rw-r--r-- | back-end/Taskfile.yaml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/back-end/Taskfile.yaml b/back-end/Taskfile.yaml new file mode 100644 index 0000000..fce8399 --- /dev/null +++ b/back-end/Taskfile.yaml @@ -0,0 +1,48 @@ + +#taskfile for building the back-end server plugin + +version: '3' + +vars: + DOTNET_BUILD_FLAGS: '/p:RunAnalyzersDuringBuild=false /p:BuildInParallel=true /p:MultiProcessorCompilation=true' + +tasks: + + build: + dir: '{{.USER_WORKING_DIR}}' + cmds: + #build project + - dotnet publish -c release {{.DOTNET_BUILD_FLAGS}} + + #postbuild to package artifaces into the archives for upload + postbuild_success: + dir: '{{.USER_WORKING_DIR}}' + vars: + #output directory for the build artifacts + OUT_DIR: 'bin/release/{{.TARGET_FRAMEWORK}}/publish' + + cmds: + #pack up source code + - task: packsource + + #copy license to output dir + - powershell -Command "cp '{{.MODULE_DIR}}/LICENSE.txt' -Destination '{{.OUT_DIR}}/LICENSE.txt'" + + #tar the plugin output and put it in the bin dir + - cd {{.OUT_DIR}} && tar -czvf '{{.USER_WORKING_DIR}}/bin/release.tgz' . + + packsource: + dir: '{{.USER_WORKING_DIR}}' + internal: true + cmds: + #copy source code to target + - powershell -Command "Get-ChildItem -Include *.cs,*.csproj -Recurse | Where { \$_.FullName -notlike '*\obj\*' -and \$_.FullName -notlike '*\bin\*' } | Resolve-Path -Relative | tar --files-from - -cvzf 'bin/src.tgz'" + + #clean hook + clean: + dir: '{{.USER_WORKING_DIR}}' + ignore_error: true + cmds: + - dotnet clean -c release + - powershell -Command "Remove-Item -Recurse bin" + - powershell -Command "Remove-Item -Recurse obj"
\ No newline at end of file |