aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-09-06 21:15:14 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-09-06 21:15:14 -0400
commit1c8b4dd1f58cbd02872bcc83bf1a18b9181625e0 (patch)
tree44fe3d8eddebbec47b042c902694a19baa00de07
parent39cf4fe06c500cda1123da270cf21c866b600c79 (diff)
parallel pack
-rw-r--r--Taskfile.yaml42
1 files changed, 30 insertions, 12 deletions
diff --git a/Taskfile.yaml b/Taskfile.yaml
index 9333200..84da2d7 100644
--- a/Taskfile.yaml
+++ b/Taskfile.yaml
@@ -16,30 +16,48 @@ tasks:
#pack up source code and put in output
- powershell -Command "Get-ChildItem -Include *.cs,*.csproj -Recurse | Where { \$_.FullName -notlike '*\obj\*' } | Resolve-Path -Relative | tar --files-from - -czf '{{.TARGET}}/src.tgz'"
- #run post in debug mode
- - for: [ win-x64, linux-x64, osx-x64, linux-arm64, linux-arm ]
- task: postbuild
- vars: { BUILD_MODE: debug, TARGET_OS: '{{ .ITEM }}'}
+ #remove uncessary files from the release dir
+ - powershell -Command "Get-ChildItem -Recurse '{{ .RELEASE_DIR }}/' -Include *.pdb,*.xml | Remove-Item"
- #remove uncessary files from the release dir
- - powershell -Command "Get-ChildItem -Recurse '{{.RELEASE_DIR}}/' -Include *.pdb,*.xml | Remove-Item"
+ - task: posbuild_parallel
+
+ posbuild_parallel:
+ deps:
+ - task: postbuild
+ vars: { BUILD_MODE: debug, TARGET_OS: win-x64 }
+ - task: postbuild
+ vars: { BUILD_MODE: debug, TARGET_OS: linux-x64 }
+ - task: postbuild
+ vars: { BUILD_MODE: debug, TARGET_OS: osx-x64 }
+ - task: postbuild
+ vars: { BUILD_MODE: debug, TARGET_OS: linux-arm }
+ - task: postbuild
+ vars: { BUILD_MODE: debug, TARGET_OS: linux-arm64 }
+
+ - task: postbuild
+ vars: { BUILD_MODE: release, TARGET_OS: win-x64 }
+ - task: postbuild
+ vars: { BUILD_MODE: release, TARGET_OS: linux-x64 }
+ - task: postbuild
+ vars: { BUILD_MODE: release, TARGET_OS: osx-x64 }
+ - task: postbuild
+ vars: { BUILD_MODE: release, TARGET_OS: linux-arm }
+ - task: postbuild
+ vars: { BUILD_MODE: release, TARGET_OS: linux-arm64 }
- - for: [ win-x64, linux-x64, osx-x64, linux-arm64, linux-arm ]
- task: postbuild
- vars: { BUILD_MODE: release, TARGET_OS: '{{ .ITEM }}'}
postbuild:
internal: true
dir: '{{.USER_WORKING_DIR}}'
vars:
- BUILD_DIR: "{{.USER_WORKING_DIR}}/bin/{{.BUILD_MODE}}/{{.TARGET_FRAMEWORK}}/{{.TARGET_OS}}/publish"
+ BUILD_DIR: "{{ .USER_WORKING_DIR }}/bin/{{ .BUILD_MODE }}/{{ .TARGET_FRAMEWORK }}/{{ .TARGET_OS }}/publish"
cmds:
#copy and readme to target
- - cmd: cd .. && powershell -Command "Copy-Item -Path ./build.readme.txt -Destination '{{.BUILD_DIR}}/readme.txt'"
+ - cmd: cd .. && powershell -Command "Copy-Item -Path ./build.readme.txt -Destination '{{ .BUILD_DIR }}/readme.txt'"
ignore_error: true
#tar outputs
- - cd "{{.BUILD_DIR}}" && tar -czf "{{.TARGET}}/{{.TARGET_OS}}-{{.BUILD_MODE}}.tgz" .
+ - cd "{{ .BUILD_DIR }}" && tar -czf "{{ .TARGET }}/{{ .TARGET_OS }}-{{ .BUILD_MODE }}.tgz" .
#Remove the output dirs on clean
clean: