From 41d0438bdb635939cb32b0bf251900568a3af4dc Mon Sep 17 00:00:00 2001 From: Vishal Verma Date: Wed, 22 Jul 2020 23:43:39 -0600 Subject: [PATCH] ndctl/contrib: update 'prepare-release' for merge workflow The commit and shortlog produced by 'prepare-release' needn't have merge commits. This only became noticeable after switching to a topic-branch/no-ff merge workflow. Update the script to: 1. Exclude merge commits from gen_lists() 2. Use vXX..HEAD~1 as the 'range' to gen_lists so we also exclude the final release commit. Signed-off-by: Vishal Verma --- contrib/prepare-release.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/prepare-release.sh b/contrib/prepare-release.sh index 5009eec2..fb5cfe38 100755 --- a/contrib/prepare-release.sh +++ b/contrib/prepare-release.sh @@ -94,8 +94,8 @@ gen_lists() { local range="$1" - git shortlog "$range" > release/shortlog - git log --pretty=format:"%s" "$range" > release/commits + git shortlog --no-merges "$range" > release/shortlog + git log --no-merges --pretty=format:"%s" "$range" > release/commits c_count=$(git log --pretty=format:"%s" "$range" | wc -l) } @@ -182,7 +182,8 @@ next_fix=$(next_fix "$last_fix") check_libtool_vers "libndctl" check_libtool_vers "libdaxctl" -gen_lists ${last_ref}..HEAD +# HEAD~1 because HEAD would be the release commit +gen_lists ${last_ref}..HEAD~1 # For ABI diff purposes, use the latest fixes tag contrib/do_abidiff ${last_fix}..HEAD