auto-update-angle.sh (2500B)
1 #!/bin/bash 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 6 set -vex 7 8 if [[ -z "${MOZ_AUTOMATION}" ]]; then 9 echo "This script is only meant to be used to update ANGLE via ./mach vendor when in automation." 10 echo "However, if you set a few environment variables yourself, this script" 11 echo "will probably work locally." 12 exit 1 13 fi 14 15 if [ "$#" -ne 1 ]; then 16 echo "Usage: auto-update-angle.sh upstream-tag" 17 exit 1 18 fi 19 20 export DEPOT_TOOLS_WIN_TOOLCHAIN=0 21 export GYP_MSVS_OVERRIDE_PATH="$MOZ_FETCHES_DIR/VS" 22 export GYP_MSVS_VERSION=2019 23 export vs2019_install="$MOZ_FETCHES_DIR/VS" 24 export WINDOWSSDKDIR="$MOZ_FETCHES_DIR/SDK" 25 export WINDIR="$MOZ_FETCHES_DIR/WinDir" 26 27 set +v 28 export INCLUDE="" 29 export INCLUDE="$INCLUDE;$MOZ_FETCHES_DIR/VS/VC/Tools/MSVC/14.29.30133/ATLMFC/include" 30 export INCLUDE="$INCLUDE;$MOZ_FETCHES_DIR/VS/VC/Tools/MSVC/14.29.30133/include" 31 32 export LIB="" 33 export LIB="$LIB;$MOZ_FETCHES_DIR/VS/VC/Tools/MSVC/14.29.30133/ATLMFC/lib/x64" 34 export LIB="$LIB;$MOZ_FETCHES_DIR/VS/VC/Tools/MSVC/14.29.30133/lib/x64" 35 export LIB="$LIB;$MOZ_FETCHES_DIR/SDK/Lib/10.0.19041.0/um/x64" 36 export LIB="$LIB;$MOZ_FETCHES_DIR/SDK/Lib/10.0.19041.0/ucrt/x64" 37 set -v 38 39 # depot_tools 40 # This needs to use the /c/ format, rather than C:/ format. PWD will translate for us though. 41 pushd $MOZ_FETCHES_DIR 42 MOZ_FETCHES_PATH=$(pwd) 43 popd 44 export PATH="$MOZ_FETCHES_PATH/depot_tools:$PATH" 45 46 # Do not update depot tools automatically 47 export DEPOT_TOOLS_UPDATE=0 48 pushd "$MOZ_FETCHES_DIR/depot_tools" 49 touch .disable_auto_update 50 51 ################################################ 52 if test -n "$GENERATE_DEPOT_TOOLS_BINARIES"; then 53 # We're generating binaries, so run the setup manually 54 cmd '/c cipd_bin_setup.bat' 55 56 pushd bootstrap 57 cmd '/c win_tools.bat' 58 popd 59 else 60 # Move the preloaded binaries into place so we don't need to do any setup 61 mv "$MOZ_FETCHES_DIR"/depot_tools-preloaded-binaries/* . 62 # Move the hidden files also. If we don't do the .[^.]* we get an error trying to move . and .. 63 mv "$MOZ_FETCHES_DIR"/depot_tools-preloaded-binaries/.[^.]* . 64 fi 65 66 ################################################ 67 68 popd 69 70 # do the update 71 cd "$MOZ_FETCHES_DIR" 72 git clone https://chromium.googlesource.com/angle/angle 73 cd angle 74 git checkout "origin/$1" 75 76 python3 scripts/bootstrap.py 77 78 gclient sync 79 80 python3 "$GECKO_PATH/gfx/angle/update-angle.py" origin 81 82 cd $GECKO_PATH 83 hg status