package.sh 941 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. . ../build_cli.sh
  21. if [[ "${VSCODE_ARCH}" == "x64" ]]; then
  22. if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
  23. echo "Building REH"
  24. npm run gulp minify-vscode-reh
  25. npm run gulp "vscode-reh-win32-${VSCODE_ARCH}-min-ci"
  26. fi
  27. if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
  28. echo "Building REH-web"
  29. npm run gulp minify-vscode-reh-web
  30. npm run gulp "vscode-reh-web-win32-${VSCODE_ARCH}-min-ci"
  31. fi
  32. fi
  33. cd ..