File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,16 @@ jobs:
5858 id : get_commits
5959 shell : bash
6060 run : |
61- # Get the most recent tag (assuming releases are tagged)
62- PREV_TAG=$(git describe --tags --abbrev=0)
63- echo "Previous tag: $PREV_TAG"
64-
65- # List commits since last tag
66- COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s" --no-merges)
61+ # Get the most recent tag
62+ PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "none")
63+ if [ "$PREV_TAG" = "none" ]; then
64+ echo "No previous tag found, listing all commits"
65+ COMMITS=$(git log --pretty=format:"* %s" --no-merges)
66+ else
67+ echo "Previous tag: $PREV_TAG"
68+ # List commits since last tag
69+ COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s" --no-merges)
70+ fi
6771 echo "Commits since last release: $COMMITS"
6872
6973 # Save commits to environment file for later use
You can’t perform that action at this time.
0 commit comments