ci-msi-build-oss.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. set -e
  3. WORKING_DIRECTORY=$(pwd)
  4. # copy zip file to /tmp/dist
  5. mkdir -p /tmp/dist
  6. cp ./dist/*.zip /tmp/dist
  7. echo "Contents of /tmp/dist"
  8. ls -al /tmp/dist
  9. # nssm download has been unreliable, use a cached copy of it
  10. echo "Caching NSSM"
  11. mkdir -p /tmp/cache
  12. cp ./scripts/build/ci-msi-build/oss/cache/nssm-2.24.zip /tmp/cache
  13. # a build can be specified, which will be pulled down
  14. #python3 generator/build.py --build 5.4.3
  15. #echo "LIGHT config"
  16. #ls -al /home/xclient/wix/light.exe.config
  17. #cat /home/xclient/wix/light.exe.config
  18. #cp ./scripts/build/ci-msi-build/oss/light.exe.config /home/xclient/wix/light.exe.config
  19. #cat /home/xclient/wix/light.exe.config
  20. cd ./scripts/build/ci-msi-build/oss
  21. echo "Building MSI"
  22. python3 generator/build.py "$@"
  23. chmod a+x /tmp/scratch/*.msi
  24. echo "MSI: Copy to $WORKING_DIRECTORY/dist"
  25. cp /tmp/scratch/*.msi "$WORKING_DIRECTORY/dist"
  26. echo "MSI: Generate SHA256"
  27. MSI_FILE=$(ls "$WORKING_DIRECTORY"/dist/*.msi)
  28. SHA256SUM=$(sha256sum "$MSI_FILE" | cut -f1 -d' ')
  29. echo "$SHA256SUM" > "$MSI_FILE.sha256"
  30. echo "MSI: SHA256 file content:"
  31. cat "$MSI_FILE.sha256"
  32. echo "MSI: contents of $WORKING_DIRECTORY/dist"
  33. ls -al "$WORKING_DIRECTORY/dist"