1234567891011121314151617181920212223242526272829 |
- #!/usr/bin/env bash
- set -ex
- ## remove build directory
- rm -rf build
- ## build for both 32 and 64bit
- pkg --out-path build package.json --targets \
- node10-linux-x86,node10-linux-x64,\
- node10-alpine-x64,\
- node10-win-x86,node10-win-x64,\
- node10-macos-x86,node10-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 *
|