Files
sdk/tools/patches/flutter-engine/create.sh
T
Martin Kustermann 1bfc3816d8 [infra] Extend 3head patching to apply patches for flutter/flutter depending on pinned engine commit
This also adds a patch to flutter/flutter to fix head-head-head
configuration (until engine is rolled into framework again).

Change-Id: I6dae0983126a6664337834d3c93f1369139f1ac1
Reviewed-on: https://dart-review.googlesource.com/c/91922
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-02-04 12:37:10 +00:00

31 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
#
# This script produces a patch to the Flutter Engine from the local uncommitted
# changes in the current engine checkout. It is named after the Dart SDK
# revision the engine is currently pinned to. It's meant to be consumed by the
# apply.sh script next to this script. Any existing patches are removed, as they
# are assumed to not be relevant anymore. If there are no uncommited changes in
# the local engine checkout, then no patch is produced.
#
# Usage: src/third_party/dart/tools/patches/flutter-engine/create.sh
# (run inside the root of a flutter engine checkout)
set -e
DIR=$(dirname -- "$(which -- "$0")")
. $DIR/../utils.sh
ensure_in_checkout_root
pinned_dart_sdk=$(get_pinned_dart_version)
patch=src/third_party/dart/tools/patches/flutter-engine/$pinned_dart_sdk.patch
rm -f src/third_party/dart/tools/patches/flutter-engine/*.patch
(cd src/flutter && git diff) > $patch
if [ ! -s $patch ]; then
rm $patch
fi