build-bundle-arm64.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. # This script is only for Wekan maintainer to
  3. # convert x64 bundle to arm64 bundle.
  4. if [ $# -ne 1 ]
  5. then
  6. echo "Syntax with Wekan version number:"
  7. echo " ./maintainer-make-bundle-a.sh 5.10"
  8. exit 1
  9. fi
  10. sudo apt -y install g++ build-essential p7zip-full
  11. sudo npm -g uninstall node-pre-gyp
  12. sudo npm -g install @mapbox/node-pre-gyp
  13. rm -rf bundle
  14. rm wekan-$1-arm64.zip
  15. #rm wekan-$1.zip
  16. #wget https://releases.wekan.team/wekan-$1.zip
  17. 7z x wekan-$1-amd64.zip
  18. (cd bundle/programs/server && chmod u+w *.json && cd node_modules/fibers && node build.js)
  19. #cd ../../../..
  20. #(cd bundle/programs/server/npm/node_modules/meteor/accounts-password && npm remove bcrypt && npm install bcrypt)
  21. # Requires building from source https://github.com/meteor/meteor/issues/11682
  22. (cd bundle/programs/server/npm/node_modules/meteor/accounts-password && npm rebuild --build-from-source)
  23. cd bundle
  24. find . -type d -name '*-garbage*' | xargs rm -rf
  25. find . -name '*phantom*' | xargs rm -rf
  26. find . -name '.*.swp' | xargs rm -f
  27. find . -name '*.swp' | xargs rm -f
  28. cd ..
  29. 7z a wekan-$1-arm64.zip bundle
  30. sudo snap start juju-db
  31. ./start-wekan.sh