#taskfile for building the libraries for admin and clients and creating their packages version: '3' tasks: package-update: dir: '{{.USER_WORKING_DIR}}' cmds: - npm update build: dir: '{{.USER_WORKING_DIR}}' cmds: - cmd: npm version {{ .BUILD_VERSION }} ignore_error: true #error if run when version is not updated #install deps and run build - npm version - npm install #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: - for: [node_modules/, dist/, bin/] cmd: powershell -Command "Remove-Item -Recurse -Force {{.ITEM}}"