build.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. yarn gulp vscode-darwin-min-ci
  27. elif [[ "$CI_WINDOWS" == "True" ]]; then
  28. cp LICENSE.txt LICENSE.rtf # windows build expects rtf license
  29. yarn gulp "vscode-win32-${BUILDARCH}-min-ci"
  30. yarn gulp "vscode-win32-${BUILDARCH}-code-helper"
  31. yarn gulp "vscode-win32-${BUILDARCH}-inno-updater"
  32. yarn gulp "vscode-win32-${BUILDARCH}-archive"
  33. yarn gulp "vscode-win32-${BUILDARCH}-system-setup"
  34. yarn gulp "vscode-win32-${BUILDARCH}-user-setup"
  35. else # linux
  36. yarn gulp vscode-linux-${BUILDARCH}-min-ci
  37. yarn gulp "vscode-linux-${BUILDARCH}-build-deb"
  38. if [[ "$BUILDARCH" == "x64" ]]; then
  39. yarn gulp "vscode-linux-${BUILDARCH}-build-rpm"
  40. fi
  41. . ../create_appimage.sh
  42. fi
  43. kill $KA_PID
  44. cd ..
  45. fi