build.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. set -ex
  3. if [[ "$SHOULD_BUILD" == "yes" ]]; then
  4. npm config set scripts-prepend-node-path true
  5. export BUILD_SOURCEVERSION=$LATEST_MS_COMMIT
  6. echo "LATEST_MS_COMMIT: ${LATEST_MS_COMMIT}"
  7. echo "BUILD_SOURCEVERSION: ${BUILD_SOURCEVERSION}"
  8. if [[ "$CI_WINDOWS" == "True" ]]; then
  9. export npm_config_arch="$BUILDARCH"
  10. export npm_config_target_arch="$BUILDARCH"
  11. fi
  12. . prepare_vscode.sh
  13. cd vscode || exit
  14. yarn monaco-compile-check
  15. yarn valid-layers-check
  16. yarn gulp compile-build
  17. yarn gulp compile-extensions-build
  18. yarn gulp minify-vscode
  19. if [[ "$OS_NAME" == "osx" ]]; then
  20. yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
  21. elif [[ "$CI_WINDOWS" == "True" ]]; then
  22. cp LICENSE.txt LICENSE.rtf # windows build expects rtf license
  23. yarn gulp "vscode-win32-${BUILDARCH}-min-ci"
  24. yarn gulp "vscode-win32-${BUILDARCH}-code-helper"
  25. yarn gulp "vscode-win32-${BUILDARCH}-inno-updater"
  26. yarn gulp "vscode-win32-${BUILDARCH}-archive"
  27. yarn gulp "vscode-win32-${BUILDARCH}-system-setup"
  28. yarn gulp "vscode-win32-${BUILDARCH}-user-setup"
  29. else # linux
  30. yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
  31. if [[ "$SKIP_LINUX_PACKAGES" != "True" ]]; then
  32. yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
  33. yarn gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
  34. . ../create_appimage.sh
  35. fi
  36. fi
  37. cd ..
  38. fi