Last active
August 24, 2022 12:42
-
-
Save samiron/5d02ea6d932be299247c52f29105e352 to your computer and use it in GitHub Desktop.
find jira items since the last tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: | |
# ./release-items.sh last-release-tag jira_number_prefix [-v] | |
jira_prefix=$1 | |
since_tag=$2 | |
if [ -z "$3" ]; then | |
lines=$(git log --oneline --first-parent "$since_tag"..HEAD | cut -d ' ' -f 5- | sed -nE "s/.*((:?${jira_prefix})\-[0-9]{3,6}).*/\1/p") | |
else | |
lines=$(git log --oneline --first-parent "$since_tag"..HEAD | cut -d ' ' -f 5- | grep "${jira_prefix}\-") | |
fi | |
printf "\n\nNumber of items in release:" | |
echo "$lines" | wc -l | |
printf "\n%s\n" "$lines"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment