• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# Copyright 2020 The Amber Authors
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# Defined to use origin/master instead of origin/main
17clspv=1
18cpplint=1
19dxc=1
20glslang=1
21googletest=1
22json=1
23lodepng=1
24spirv_headers=1
25spirv_tools=1
26swiftshader=1
27vulkan_loader=1
28vulkan_validationlayers=1
29
30
31# This script assumes it's parent directory is the repo root.
32repo_path=$(dirname "$0")/..
33
34cd "$repo_path"
35
36if [[ $(git diff --stat) != '' ]]; then
37    echo "Working tree is dirty, commit changes before attempting to roll DEPS"
38    exit 1
39fi
40
41old_head=$(git rev-parse HEAD)
42
43for i in $(find third_party -maxdepth 1 -mindepth 1 -type d); do
44  name=`echo "${i%%/}" | cut -f2 -d'/' | tr '-' '_'`
45
46  if [ "x${name}" == "xcpplint" ]; then
47    continue
48  fi
49
50  trunk="origin/main"
51  if [ ! -z ${!name} ]; then
52    trunk="origin/master"
53  fi
54
55  roll-dep --ignore-dirty-tree --roll-to="${trunk}" "${i%%/}";
56done
57
58git rebase --interactive "${old_head}"
59