2
0

build.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env bash
  2. # shellcheck disable=SC1091
  3. set -ex
  4. . version.sh
  5. if [[ "${SHOULD_BUILD}" == "yes" ]]; then
  6. echo "MS_COMMIT=\"${MS_COMMIT}\""
  7. . prepare_vscode.sh
  8. cd vscode || { echo "'vscode' dir not found"; exit 1; }
  9. export NODE_OPTIONS="--max-old-space-size=8192"
  10. yarn monaco-compile-check
  11. yarn valid-layers-check
  12. yarn gulp compile-build
  13. yarn gulp compile-extension-media
  14. yarn gulp compile-extensions-build
  15. yarn gulp minify-vscode
  16. if [[ "${OS_NAME}" == "osx" ]]; then
  17. yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
  18. find "../VSCode-darwin-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
  19. VSCODE_PLATFORM="darwin"
  20. elif [[ "${OS_NAME}" == "windows" ]]; then
  21. # generate Group Policy definitions
  22. node build/lib/policies
  23. # in CI, packaging will be done by a different job
  24. if [[ "${CI_BUILD}" == "no" ]]; then
  25. . ../build/windows/rtf/make.sh
  26. yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
  27. if [[ "${VSCODE_ARCH}" != "x64" ]]; then
  28. SHOULD_BUILD_REH="no"
  29. SHOULD_BUILD_REH_WEB="no"
  30. fi
  31. fi
  32. VSCODE_PLATFORM="win32"
  33. else # linux
  34. # in CI, packaging will be done by a different job
  35. if [[ "${CI_BUILD}" == "no" ]]; then
  36. yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
  37. find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
  38. fi
  39. VSCODE_PLATFORM="linux"
  40. fi
  41. if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
  42. yarn gulp minify-vscode-reh
  43. yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
  44. fi
  45. if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
  46. yarn gulp minify-vscode-reh-web
  47. yarn gulp "vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
  48. fi
  49. cd ..
  50. fi