build.sh 457 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. set -ex
  3. ## remove build directory
  4. rm -rf build
  5. ## build for 64bit
  6. pkg --out-path build package.json --targets \
  7. node14-linux-x64,\
  8. node14-alpine-x64,\
  9. node14-win-x64,\
  10. node14-macos-x64
  11. ## archive builds
  12. cd build
  13. for file in *; do
  14. du -sh $file
  15. if [[ $file == *".exe"* ]]; then
  16. mv $file d-fi.exe
  17. zip ${file%.*}.zip d-fi.exe
  18. rm d-fi.exe
  19. else
  20. mv $file d-fi
  21. zip ${file%.*}.zip d-fi
  22. rm d-fi
  23. fi
  24. done
  25. du -sh *