fix: support initial commit in case of initialization from empty changelog list
This commit is contained in:
parent
9e9216b5d9
commit
d811d16d24
@ -16,11 +16,11 @@ if [ -z "$noRelease" ];
|
|||||||
then
|
then
|
||||||
lastVersion=$(changie latest)
|
lastVersion=$(changie latest)
|
||||||
lastSeenCommit=$(cat .changes/$lastVersion.md | grep --only-matching --max-count 1 -E '\b[0-9a-f]{5,40}\b')
|
lastSeenCommit=$(cat .changes/$lastVersion.md | grep --only-matching --max-count 1 -E '\b[0-9a-f]{5,40}\b')
|
||||||
else
|
|
||||||
lastSeenCommit=$(git rev-list --max-parents=0 HEAD --abbrev-commit)
|
|
||||||
fi
|
|
||||||
|
|
||||||
commit=$(git log --oneline --pretty=format:'%h - %s' --abbrev-commit $lastSeenCommit..HEAD)
|
commit=$(git log --no-merges --oneline --pretty=format:'%h - %s' --abbrev-commit $lastSeenCommit..HEAD)
|
||||||
|
else
|
||||||
|
commit=$(git log --no-merges --oneline --pretty=format:'%h - %s' --abbrev-commit)
|
||||||
|
fi
|
||||||
|
|
||||||
# deal with case of no new commit
|
# deal with case of no new commit
|
||||||
if [ -n "$commit" ]; then
|
if [ -n "$commit" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user