aboutsummaryrefslogtreecommitdiff
path: root/third-party/DotNetCorePlugins/Taskfile.yaml
blob: 99839dc33efc0c29c5c8c118d5552870f6717c0e (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
49
# https://taskfile.dev

#Called by the vnbuild system to produce builds for my website
#https://www.vaughnnugent.com/resources/software

# Taskfile specific to DotNetCorePlugins project
# currently this taskfile only packs up the source code 
# and test source code into a source code tgz file for 
# distribution. The changes file and license file are also
# included

version: '3'

tasks:

  #when build succeeds, archive the output into a tgz 
  postbuild_success:
    dir: '{{.USER_WORKING_DIR}}'
    cmds:
     - task: pack_source
  
  pack_source:
    internal: true
    dir: '{{ .USER_WORKING_DIR }}'
    vars:
      EXCLUDES:
        --exclude='bin/*'
        --exclude='obj/*'
        #--exclude='.tarignore'
      INCLUDES:
        src/*
        test/*
        CHANGES.md
        LICENSE
        Taskfile.yaml
        README.md

    cmds:
      #pack up source code and put in output
     - cmd: cd .. && tar {{ .EXCLUDES }} -czf '{{ .USER_WORKING_DIR }}/bin/src.tgz' {{ .INCLUDES }}    


#Remove the output dirs on clean
  clean:
    dir: '{{.USER_WORKING_DIR}}'
    ignore_error: true
    cmds:
    - for: [ bin/, obj/ ]
      cmd: powershell -Command "rm -Recurse -Force '{{.ITEM}}'"