build.sh 1.5 KB

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