aboutsummaryrefslogtreecommitdiff
path: root/lib/Taskfile.yaml
blob: e2989c2ec51ac37b3df7486969043dd69566aadd (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

#taskfile for building the libraries for admin and clients and creating their packages

version: '3'

tasks:

  build:
    dir: '{{.USER_WORKING_DIR}}'
    cmds:
    #install deps and run build
    - npm install
    - npm run build
    
  #copy artifacts to temp directory
  postbuild_success:
    dir: '{{.USER_WORKING_DIR}}'
    cmds:
    - powershell -Command "mkdir bin -Force"
    #tar the package and put it in the output dir
    - tar --exclude="./node_modules" --exclude="./src" --exclude="./.git" --exclude="./bin" --exclude=".gitignore" --exclude="*.yaml" -czf bin/release.tgz .

  #clean hook
  clean:
    dir: '{{.USER_WORKING_DIR}}'
    ignore_error: true
    cmds:
    - cmd: powershell -Command "Remove-Item -Recurse node_modules"
    - cmd: powershell -Command "Remove-Item -Recurse dist"
    - cmd: powershell -Command "Remove-Item -Recurse -Force bin"
    - cmd: powershell -Command "Remove-Item release.tgz"