[PATCH 2/2] dim: switch to per-branch tag templates

Daniel Vetter daniel.vetter at ffwll.ch
Fri Dec 1 09:03:20 UTC 2017


Since we rotate maintainer functions now on a per-release basis, and
that seems to be a superior model (bettter exchanged and sharing of
knowledge) per-maintainer templates don't make much sense.

Instead use per-branch templates. To keep some separation between the
scripts and the setup I opted to put the templates into the drm-rerere
branch, where we have nightly.conf already. I've pushed a few examples
there of what I have in mind.

Once this has landed I'll send out the patch for drm-rerere with some
templates to start with.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 dim     | 13 +++++++------
 dim.rst |  4 ----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/dim b/dim
index c1a8137f2af3..4c7baae99c9a 100755
--- a/dim
+++ b/dim
@@ -64,9 +64,6 @@ DIM_TEMPLATE_HELLO=${DIM_TEMPLATE_HELLO:-$HOME/.dim.template.hello}
 # signature pull request template
 DIM_TEMPLATE_SIGNATURE=${DIM_TEMPLATE_SIGNATURE:-$HOME/.dim.template.signature}
 
-# dim pull-request tag summary template
-DIM_TEMPLATE_TAG_SUMMARY=${DIM_TEMPLATE_TAG_SUMMARY:-$HOME/.dim.template.tagsummary}
-
 # GPG key id for signing tags. If unset, don't sign.
 DIM_GPG_KEYID=${DIM_GPG_KEYID:+-u $DIM_GPG_KEYID}
 
@@ -1620,8 +1617,12 @@ function dim_tag_next
 
 function tag_summary
 {
-	if [ -r $DIM_TEMPLATE_TAG_SUMMARY ]; then
-		cat $DIM_TEMPLATE_TAG_SUMMARY
+	local branch tag_template
+	branch=$1
+	tag_template=$DIM_PREFIX/drm-rerere/$branch.tag-template
+
+	if [ -r $tag_template ]; then
+		cat $tag_template
 	else
 		cat <<-EOF
 		UAPI Changes:
@@ -1642,7 +1643,7 @@ function tag_branch
 	tag=$1
 	branch=$2
 
-	tag_summary | $DRY git tag -F- $tag "$branch@{upstream}"
+	tag_summary $branch | $DRY git tag -F- $tag "$branch@{upstream}"
 	$DRY git tag -a $DIM_GPG_KEYID -f $tag
 }
 
diff --git a/dim.rst b/dim.rst
index ba834192785f..e66d9c8f5898 100644
--- a/dim.rst
+++ b/dim.rst
@@ -500,10 +500,6 @@ DIM_TEMPLATE_SIGNATURE
 ----------------------
 Path to a file containing a signature template for pull request mails.
 
-DIM_TEMPLATE_TAG_SUMMARY
--------------------------
-Path to a file containing the template for dim pull-request tag summaries.
-
 DIM_GPG_KEYID
 -------------
 GPG key ID to use for signing tags. If set, tags will be signed. If unset, the
-- 
2.15.0



More information about the dim-tools mailing list