123456789101112131415161718192021222324252627282930313233 |
- #!/usr/bin/env bash
- set -ex
- ## remove build directory
- rm -rf build
- ## genrate js
- rm -rf dist
- yarn build
- ## build for 64bit
- pkg --out-path build package.json --targets \
- node14-linux-x64,\
- node14-alpine-x64,\
- node14-win-x64,\
- node14-macos-x64
- ## archive builds
- cd build
- for file in *; do
- du -sh $file
- if [[ $file == *".exe"* ]]; then
- mv $file d-fi.exe
- zip ${file%.*}.zip d-fi.exe
- rm d-fi.exe
- else
- mv $file d-fi
- zip ${file%.*}.zip d-fi
- rm d-fi
- fi
- done
- du -sh *
|