blob: a3791d38bd57a42b393f2102eefd58f5142fe315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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' -Destination '{{.OUT_DIR}}/LICENSE'"
#tar the plugin output and put it in the bin dir
- cd {{.OUT_DIR}} && tar -czf '{{.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 - -czf '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"
|