Created
March 8, 2019 17:31
-
-
Save Hammond95/f626bd13f33579cc36bc2a994f395943 to your computer and use it in GitHub Desktop.
Having a file which keeps the version of the project, automatically generates a changelog.md like file containing the info about commits between versions.
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/bash | |
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
COMMITS_VERSIONS=$(git log --follow -- "${SCRIPTDIR}/../VERSION" | grep -E '^commit' | sed 's#commit ##g') | |
NEXT=$(echo -e "$COMMITS_VERSIONS" | head -1) | |
COMMITS_VERSIONS=$(echo -e "$COMMITS_VERSIONS" | tail -n+2) | |
for commit in $COMMITS_VERSIONS; do | |
VERSION=$(git show ${NEXT}:../pycuebiq/VERSION) | |
echo -e "${VERSION}\n----------------\n" | |
COMMENTS=$(git log ${commit}...${NEXT}) | |
echo -e "${COMMENTS}\n" | |
NEXT=${commit} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment