Skip to content

Commit

Permalink
chore: fix incorrect previous tag retrieval logic
Browse files Browse the repository at this point in the history
  • Loading branch information
boricj committed Sep 12, 2023
1 parent 56ae94a commit 94f2184
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions developer_scripts/generate-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ then
fi

CURRENT_TAG=$(git describe --tags HEAD)
PREVIOUS_TAG=$(git describe --tags HEAD^ 2>/dev/null || true)
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || true)

if [ -z "${PREVIOUS_TAG}" ]
then
echo >&2 "Generating release notes for ${CURRENT_TAG} from beginning..."
java -jar "developer_scripts/${GIT_CHANGELOG_COMMAND_LINE_JAR}" --github-enabled --template developer_scripts/release-notes.mustache -std
else
echo >&2 "Generating release notes for ${CURRENT_TAG} from ${PREVIOUS_TAG}..."
java -jar "developer_scripts/${GIT_CHANGELOG_COMMAND_LINE_JAR}" --github-enabled --template developer_scripts/release-notes.mustache -std --from-revision "$(git describe --tags HEAD^)"
java -jar "developer_scripts/${GIT_CHANGELOG_COMMAND_LINE_JAR}" --github-enabled --template developer_scripts/release-notes.mustache -std --from-revision "${PREVIOUS_TAG}"
fi

0 comments on commit 94f2184

Please sign in to comment.