diff mbox series

[v4,06/11] dts: Add script to uprev dts/upstream subtree

Message ID 20240110103547.719757-7-sumit.garg@linaro.org
State New
Headers show
Series An effort to bring DT bindings compliance within U-Boot | expand

Commit Message

Sumit Garg Jan. 10, 2024, 10:35 a.m. UTC
dts/update-dts-subtree.sh is just a wrapper around git subtree pull
command. Usage from the top level U-Boot source tree, run:

$ ./dts/update-dts-subtree.sh <release-tag>

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
---

Changes in v4:
- New patch to add script dts/update-dts-subtree.sh as per Rob's comments.

 dts/update-dts-subtree.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 dts/update-dts-subtree.sh
diff mbox series

Patch

diff --git a/dts/update-dts-subtree.sh b/dts/update-dts-subtree.sh
new file mode 100755
index 00000000000..2077094d0d2
--- /dev/null
+++ b/dts/update-dts-subtree.sh
@@ -0,0 +1,24 @@ 
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2024 Linaro Ltd.
+#
+# Usage: from the top level U-Boot source tree, run:
+# $ ./dts/update-dts-subtree.sh <release-tag>
+#
+# The script will pull changes from devicetree-rebasing repo into U-Boot
+# as a subtree located as <U-Boot>/dts/upstream sub-directory. It will
+# automatically create a squash/merge commit listing the commits imported.
+
+set -e
+
+merge_commit_msg=$(cat << EOF
+Subtree merge tag '$1' of devicetree-rebasing repo [1] into dts/upstream
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/
+EOF
+)
+
+git subtree pull --prefix dts/upstream \
+    git://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git \
+    $1 --squash -m "${merge_commit_msg}"