build.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env bash
  2. # shellcheck disable=SC1091
  3. set -ex
  4. if [[ -f "./remote-dependencies.tar" ]]; then
  5. tar -xf ./remote-dependencies.tar ./vscode/remote/node_modules
  6. fi
  7. . version.sh
  8. if [[ "${SHOULD_BUILD}" == "yes" ]]; then
  9. npm config set scripts-prepend-node-path true
  10. npm config set node_gyp
  11. echo "MS_COMMIT=\"${MS_COMMIT}\""
  12. . prepare_vscode.sh
  13. cd vscode || { echo "'vscode' dir not found"; exit 1; }
  14. yarn monaco-compile-check
  15. yarn valid-layers-check
  16. yarn gulp compile-build
  17. yarn gulp compile-extension-media
  18. yarn gulp compile-extensions-build
  19. yarn gulp minify-vscode
  20. if [[ "${OS_NAME}" == "osx" ]]; then
  21. yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
  22. find "../VSCode-darwin-${VSCODE_ARCH}" -exec touch {} \;
  23. VSCODE_PLATFORM="darwin"
  24. elif [[ "${OS_NAME}" == "windows" ]]; then
  25. . ../build/windows/rtf/make.sh
  26. yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
  27. if [[ "${VSCODE_ARCH}" != "ia32" && "${VSCODE_ARCH}" != "x64" ]]; then
  28. SHOULD_BUILD_REH="no"
  29. fi
  30. VSCODE_PLATFORM="win32"
  31. elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then # linux-ppc64le
  32. VSCODE_PLATFORM="linux"
  33. else # linux
  34. yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
  35. find "../VSCode-linux-${VSCODE_ARCH}" -exec touch {} \;
  36. VSCODE_PLATFORM="linux"
  37. fi
  38. if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
  39. yarn gulp minify-vscode-reh
  40. yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
  41. fi
  42. cd ..
  43. fi