devops: update electron build tools (#12891)

This commit is contained in:
Andrey Lushnikov 2022-03-18 15:48:10 -06:00 committed by GitHub
parent dd32956ccc
commit 2ec3866f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,21 @@ set -x
trap "cd $(pwd -P)" EXIT
cd "$(dirname "$0")"
ELECTRON_BUILD_TOOLS_REQUIRED_VERSION=6ba8962529c37727a778691b89c92ab0eb1d9d87
if [[ -d ./electron-build-tools ]]; then
cd ./electron-build-tools
# Make sure required commit is part of electron-build-tools.
if ! git merge-base --is-ancestor "${ELECTRON_BUILD_TOOLS_REQUIRED_VERSION}" HEAD; then
cd ..
rm -rf ./electron-build-tools
echo "Updating electron-build-tools"
else
cd ..
fi
fi
if [[ ! -d ./electron-build-tools ]]; then
git clone --single-branch --branch master https://github.com/electron/build-tools/ electron-build-tools
git clone --single-branch --branch main https://github.com/electron/build-tools/ electron-build-tools
cd electron-build-tools
npm install
mkdir -p third_party