Skip to content

Commit

Permalink
Allow to create release notes from branch
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman committed Mar 5, 2023
1 parent d50dbf4 commit 014becd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/create_release_notes.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#!/bin/bash

current_tag=$(git describe --abbrev=0 --tags HEAD)
previous_tag_hash=$(git rev-list --tags --skip=1 --max-count=1)
function is_head_tagged() {
git describe --exact-match --tags HEAD 2>/dev/null
}

if is_head_tagged; then
current_tag=$(git describe --abbrev=0 --tags HEAD)
previous_tag_hash=$(git rev-list --tags --skip=1 --max-count=1)
else
previous_tag_hash=$(git rev-list --tags --max-count=1)
fi

previous_tag=$(git describe --abbrev=0 --tags $previous_tag_hash)


range="$previous_tag..HEAD"

commits_since_previous_tag=$(git log --no-merges --pretty=format:"* %s" $range)
Expand Down

0 comments on commit 014becd

Please sign in to comment.