build.sh 1.3 KB

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