build.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/bash
  2. set -ex
  3. . version.sh
  4. if [[ "${SHOULD_BUILD}" == "yes" ]]; then
  5. npm config set scripts-prepend-node-path true
  6. npm config set node_gyp
  7. echo "MS_COMMIT=\"${MS_COMMIT}\""
  8. . prepare_vscode.sh
  9. cd vscode || { echo "'vscode' dir not found"; exit 1; }
  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}" -exec touch {} \;
  19. VSCODE_PLATFORM="darwin"
  20. elif [[ "${OS_NAME}" == "windows" ]]; then
  21. . ../build/windows/rtf/make.sh
  22. yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
  23. if [[ "${VSCODE_ARCH}" != "ia32" && "${VSCODE_ARCH}" != "x64" ]]; then
  24. SHOULD_BUILD_REH="no"
  25. fi
  26. VSCODE_PLATFORM="win32"
  27. else # linux
  28. yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
  29. find "../VSCode-linux-${VSCODE_ARCH}" -exec touch {} \;
  30. VSCODE_PLATFORM="linux"
  31. fi
  32. if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
  33. yarn gulp minify-vscode-reh
  34. yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
  35. fi
  36. cd ..
  37. fi