build.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. ### Windows
  3. # to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh
  4. ###
  5. export CI_BUILD="no"
  6. export SHOULD_BUILD="yes"
  7. export SKIP_PACKAGES="yes"
  8. export VSCODE_LATEST="no"
  9. export VSCODE_QUALITY="stable"
  10. while getopts ":ilp" opt; do
  11. case "$opt" in
  12. i)
  13. export VSCODE_QUALITY="insider"
  14. ;;
  15. l)
  16. export VSCODE_LATEST="yes"
  17. ;;
  18. p)
  19. export SKIP_PACKAGES="no"
  20. ;;
  21. esac
  22. done
  23. case "${OSTYPE}" in
  24. darwin*)
  25. export OS_NAME="osx"
  26. ;;
  27. msys* | cygwin*)
  28. export OS_NAME="windows"
  29. ;;
  30. *)
  31. export OS_NAME="linux"
  32. ;;
  33. esac
  34. UNAME_ARCH=$( uname -m )
  35. if [[ "${UNAME_ARCH}" == "arm64" ]]; then
  36. export VSCODE_ARCH="arm64"
  37. else
  38. export VSCODE_ARCH="x64"
  39. fi
  40. echo "OS_NAME=\"${OS_NAME}\""
  41. echo "SKIP_PACKAGES=\"${SKIP_PACKAGES}\""
  42. echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
  43. echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
  44. echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
  45. rm -rf vscode* VSCode*
  46. . get_repo.sh
  47. . build.sh
  48. if [[ "${SKIP_PACKAGES}" == "no" ]]; then
  49. if [[ "${OS_NAME}" == "windows" ]]; then
  50. rm -rf build/windows/msi/releasedir
  51. fi
  52. . prepare_artifacts.sh
  53. fi