Last active
April 10, 2019 11:18
-
-
Save natiginfo/f0d0d0a17956a4c68fc44703b5c4d717 to your computer and use it in GitHub Desktop.
Shell script for generating release notes based on merge history from previous last tag to latest tag.
This file contains hidden or 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/bash | |
FILE_NAME="release_notes.txt" | |
COMMIT_HASH_FOR_TAG_BEFORE_LAST=$(git rev-list --tags --skip=1 --max-count=1) | |
TAG_BEFORE_LAST=$(git describe --abbrev=0 --tags $COMMIT_HASH_FOR_TAG_BEFORE_LAST) | |
LAST_TAG=$(git describe --abbrev=0 --tags) | |
LOGS=$(git log $TAG_BEFORE_LAST..$LAST_TAG --pretty="* format:%s" --merges) | |
$(rm -rf $FILE_NAME) | |
echo -e "$LAST_TAG\n$LOGS" >> $FILE_NAME |
This file contains hidden or 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/bash | |
# Script for checking what work you have done singe last push | |
# Checks logs between origin and local | |
CURRENT_BRANCH_NAME=$(git branch | grep \* | cut -d ' ' -f2) | |
LOGS=$(git log origin/$CURRENT_BRANCH_NAME..$CURRENT_BRANCH_NAME --pretty="* format:%s") | |
echo "$LOGS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment