build.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. export BUILD_SOURCEVERSION=$LATEST_MS_COMMIT
  11. echo "LATEST_MS_COMMIT: ${LATEST_MS_COMMIT}"
  12. echo "BUILD_SOURCEVERSION: ${BUILD_SOURCEVERSION}"
  13. # export npm_config_arch="$BUILDARCH"
  14. # export npm_config_target_arch="$BUILDARCH"
  15. # ./prepare_vscode.sh
  16. cd vscode || exit
  17. yarn --version
  18. node --version
  19. CHILD_CONCURRENCY=1 yarn --frozen-lockfile
  20. yarn postinstall
  21. # these tasks are very slow, so using a keep alive to keep travis alive
  22. keep_alive &
  23. KA_PID=$!
  24. yarn monaco-compile-check
  25. yarn valid-layers-check
  26. yarn gulp compile-build
  27. yarn gulp compile-extensions-build
  28. yarn gulp minify-vscode
  29. if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  30. yarn gulp vscode-darwin-min-ci
  31. elif [[ "$CI_WINDOWS" == "True" ]]; then
  32. cp LICENSE.txt LICENSE.rtf # windows build expects rtf license
  33. yarn gulp "vscode-win32-${BUILDARCH}-min-ci"
  34. yarn gulp "vscode-win32-${BUILDARCH}-code-helper"
  35. yarn gulp "vscode-win32-${BUILDARCH}-inno-updater"
  36. yarn gulp "vscode-win32-${BUILDARCH}-archive"
  37. yarn gulp "vscode-win32-${BUILDARCH}-system-setup"
  38. yarn gulp "vscode-win32-${BUILDARCH}-user-setup"
  39. else # linux
  40. yarn gulp vscode-linux-${BUILDARCH}-min-ci
  41. yarn gulp "vscode-linux-${BUILDARCH}-build-deb"
  42. if [[ "$BUILDARCH" == "x64" ]]; then
  43. yarn gulp "vscode-linux-${BUILDARCH}-build-rpm"
  44. fi
  45. . ../create_appimage.sh
  46. fi
  47. kill $KA_PID
  48. cd ..
  49. fi