build.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. set -ex
  3. function keep_alive() {
  4. while true; do
  5. date
  6. sleep 60
  7. done
  8. }
  9. if [[ "$SHOULD_BUILD" == "yes" ]]; then
  10. npm config set scripts-prepend-node-path true
  11. export BUILD_SOURCEVERSION=$LATEST_MS_COMMIT
  12. echo "LATEST_MS_COMMIT: ${LATEST_MS_COMMIT}"
  13. echo "BUILD_SOURCEVERSION: ${BUILD_SOURCEVERSION}"
  14. export npm_config_arch="$BUILDARCH"
  15. export npm_config_target_arch="$BUILDARCH"
  16. ./prepare_vscode.sh
  17. cd vscode || exit
  18. # these tasks are very slow, so using a keep alive to keep travis alive
  19. keep_alive &
  20. KA_PID=$!
  21. yarn monaco-compile-check
  22. yarn valid-layers-check
  23. yarn gulp compile-build
  24. yarn gulp compile-extensions-build
  25. yarn gulp minify-vscode
  26. if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  27. yarn gulp vscode-darwin-min-ci
  28. elif [[ "$CI_WINDOWS" == "True" ]]; then
  29. cp LICENSE.txt LICENSE.rtf # windows build expects rtf license
  30. yarn gulp "vscode-win32-${BUILDARCH}-min-ci"
  31. yarn gulp "vscode-win32-${BUILDARCH}-code-helper"
  32. yarn gulp "vscode-win32-${BUILDARCH}-inno-updater"
  33. yarn gulp "vscode-win32-${BUILDARCH}-archive"
  34. yarn gulp "vscode-win32-${BUILDARCH}-system-setup"
  35. yarn gulp "vscode-win32-${BUILDARCH}-user-setup"
  36. else # linux
  37. yarn gulp vscode-linux-${BUILDARCH}-min-ci
  38. yarn gulp "vscode-linux-${BUILDARCH}-build-deb"
  39. if [[ "$BUILDARCH" == "x64" ]]; then
  40. yarn gulp "vscode-linux-${BUILDARCH}-build-rpm"
  41. fi
  42. . ../create_appimage.sh
  43. fi
  44. kill $KA_PID
  45. cd ..
  46. fi