Bug 1874684 - Part 28: Return DateDuration from DifferenceISODateTime. r=mgaudet
[gecko.git] / gfx / angle / auto-update-angle.sh
blobba5edf06cc0ffa8882166d8d06e04a3e7e91b8d4
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/.
6 set -vex
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
15 if [ "$#" -ne 1 ]; then
16 echo "Usage: auto-update-angle.sh upstream-tag"
17 exit 1
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"
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"
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
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"
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
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'
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/.[^.]* .
66 ################################################
68 popd
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"
76 python3 scripts/bootstrap.py
78 gclient sync
80 python3 "$GECKO_PATH/gfx/angle/update-angle.py" origin
82 cd $GECKO_PATH
83 hg status