package_linux_bin.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/usr/bin/env bash
  2. # shellcheck disable=SC1091
  3. set -ex
  4. if [[ "${CI_BUILD}" == "no" ]]; then
  5. exit 1
  6. fi
  7. tar -xzf ./vscode.tar.gz
  8. chown -R root:root vscode
  9. cd vscode || { echo "'vscode' dir not found"; exit 1; }
  10. export VSCODE_SKIP_NODE_VERSION_CHECK=1
  11. export VSCODE_SYSROOT_PREFIX='-glibc-2.17'
  12. if [[ -d "../patches/${OS_NAME}/client/" ]]; then
  13. for file in "../patches/${OS_NAME}/client/"*.patch; do
  14. if [[ -f "${file}" ]]; then
  15. echo applying patch: "${file}";
  16. if ! git apply --ignore-whitespace "${file}"; then
  17. echo failed to apply patch "${file}" >&2
  18. exit 1
  19. fi
  20. fi
  21. done
  22. fi
  23. for i in {1..5}; do # try 5 times
  24. yarn --cwd build --frozen-lockfile --check-files && break
  25. if [[ $i == 3 ]]; then
  26. echo "Yarn failed too many times" >&2
  27. exit 1
  28. fi
  29. echo "Yarn failed $i, trying again..."
  30. done
  31. ./build/azure-pipelines/linux/install.sh
  32. node build/azure-pipelines/distro/mixin-npm
  33. yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
  34. find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
  35. cd ..