build.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. # these tasks are very slow, so using a keep alive to keep travis alive
  18. keep_alive &
  19. KA_PID=$!
  20. yarn monaco-compile-check
  21. yarn valid-layers-check
  22. yarn gulp compile-build
  23. yarn gulp compile-extensions-build
  24. yarn gulp minify-vscode
  25. if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
  26. npm install --global create-dmg
  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