[PATCH 3/3] dim: switch to per-branch tag templates
Daniel Vetter
daniel.vetter at ffwll.ch
Wed Dec 13 13:12:33 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.
v2: Align to the new file layout as discussed with Joonas. Comment for
function parameters.
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
dim | 15 ++++++++-------
dim.rst | 4 ----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/dim b/dim
index 7ab4442a2d3c..48923b9fc6c5 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}
@@ -1624,10 +1621,14 @@ function dim_tag_next
}
-function tag_summary
+function tag_summary # branch
{
- if [ -r $DIM_TEMPLATE_TAG_SUMMARY ]; then
- cat $DIM_TEMPLATE_TAG_SUMMARY
+ local branch tag_template
+ branch=$1
+ tag_template=$DIM_PREFIX/drm-rerere/tag-templates/${branch//\//-}.txt
+
+ if [ -r $tag_template ]; then
+ cat $tag_template
else
cat <<-EOF
UAPI Changes:
@@ -1648,7 +1649,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.1
More information about the dim-tools
mailing list