package.sh 922 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env bash
  2. # shellcheck disable=SC1091
  3. set -ex
  4. if [[ "${CI_BUILD}" == "no" ]]; then
  5. exit 1
  6. fi
  7. tar -xzf ./vscode.tar.gz
  8. cd vscode || { echo "'vscode' dir not found"; exit 1; }
  9. for i in {1..5}; do # try 5 times
  10. npm ci && break
  11. if [[ $i -eq 3 ]]; then
  12. echo "Npm install failed too many times" >&2
  13. exit 1
  14. fi
  15. echo "Npm install failed $i, trying again..."
  16. done
  17. node build/azure-pipelines/distro/mixin-npm
  18. . ../build/windows/rtf/make.sh
  19. npm run gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
  20. if [[ "${VSCODE_ARCH}" == "x64" ]]; then
  21. if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
  22. echo "Building REH"
  23. npm run gulp minify-vscode-reh
  24. npm run gulp "vscode-reh-win32-${VSCODE_ARCH}-min-ci"
  25. fi
  26. if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
  27. echo "Building REH-web"
  28. npm run gulp minify-vscode-reh-web
  29. npm run gulp "vscode-reh-web-win32-${VSCODE_ARCH}-min-ci"
  30. fi
  31. fi
  32. cd ..