build: only download gn binary for lint step

This commit is contained in:
deepak1556 2019-02-27 17:57:23 +05:30 committed by Samuel Attard
parent e8f6f31fe4
commit 8043e2e278

View file

@ -513,10 +513,9 @@ steps-lint: &steps-lint
name: Download GN Binary
command: |
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
buildtools_revision="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep buildtools_revision -A1 | tr -d '\n' | cut -d\' -f4)"
git clone https://chromium.googlesource.com/chromium/src/buildtools "buildtools"
(cd "buildtools" && git checkout "$buildtools_revision")
mkdir -p "buildtools/linux64"
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/linux64/gn.sha1?format=TEXT" | base64 -d > "buildtools/linux64/gn.sha1"
echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/buildtools"' >> $BASH_ENV
download_from_google_storage --bucket chromium-gn -s "buildtools/linux64/gn.sha1"