summaryrefslogtreecommitdiffstats
path: root/dts/scripts/merge-new-release.sh
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-11-17 09:54:19 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-11-17 09:54:19 +0100
commit68a902345d0643c303379599d7d29471ca296700 (patch)
tree21240ae6279a6999e904613eda239ba34f1bc62c /dts/scripts/merge-new-release.sh
parent80c2876fd7d8f4b8bb0caa3160b966147e6c8d46 (diff)
downloadbarebox-68a902345d0643c303379599d7d29471ca296700.tar.gz
barebox-68a902345d0643c303379599d7d29471ca296700.tar.xz
dts: update to v4.14-rc6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'dts/scripts/merge-new-release.sh')
-rwxr-xr-xdts/scripts/merge-new-release.sh28
1 files changed, 27 insertions, 1 deletions
diff --git a/dts/scripts/merge-new-release.sh b/dts/scripts/merge-new-release.sh
index a6cf3491c9..bd2dc29618 100755
--- a/dts/scripts/merge-new-release.sh
+++ b/dts/scripts/merge-new-release.sh
@@ -16,7 +16,33 @@ v=$1
set -ex
-git merge --no-edit "${v}-raw"
+# Use the date of Linus' originally tagged commit for the merge. This might
+# differ from what the commit that the rewritten tag points to, since the
+# orignal commit may have been discarded.
+export GIT_AUTHOR_DATE=$(git log -1 --format=%ad "${v%-dts}")
+if [ ! "${GIT_AUTHOR_DATE}" ] ; then
+ echo >&2 "Unable to determine commit date for merge"
+ exit 1
+fi
+if [ "${v}" = "v2.6.12-rc2-dts" ] ; then
+ auh="--allow-unrelated-histories"
+fi
+git merge $auh --no-edit "${v}-raw"
git clean -fdqx
+# Use the date of Linus' original tag for the tag.
+case "${v%-dts}" in
+ v2.6.12*|v2.6.13-rc[123])
+ # Commits from v2.6.12-rc2..v2.6.13-rc3 lacked the date. So use the commit's
+ # date.
+ export GIT_COMMITTER_DATE="${GIT_AUTHOR_DATE}"
+ ;;
+ *)
+ export GIT_COMMITTER_DATE="$(git for-each-ref --format='%(taggerdate)' "refs/tags/${v%-dts}")"
+ ;;
+esac
+if [ ! "${GIT_COMMITTER_DATE}" ] ; then
+ echo >&2 "Unable to determine date for tag"
+ exit 1
+fi
git tag -s -m "Tagging ${v}" -u 695A46C6 "${v}"
make -k -j12 -s