Skip to content

Commit

Permalink
feat: update changelog when publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
kkostov committed Feb 6, 2024
1 parent 0370767 commit 1a79aef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions setversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ else
sed -i "s/^version: .*/version: ${NEW_VERSION}/g" "pubspec.yaml"
fi

# pub.dev requires that the CHANGELOG includes the version number.
# Make sure the CHANGELOG includes this version number. This is optional because it may have been updated manually by another action.
if ! grep -q "## ${NEW_VERSION}" CHANGELOG.md; then
echo "CHANGELOG.md does not include a section for version ${NEW_VERSION}."
echo -e "## ${NEW_VERSION}\n\n- https://github.com/TelemetryDeck/FlutterSDK/releases/tag/${NEW_VERSION}\n\n" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md
fi

echo "Version updated to ${NEW_VERSION}."

0 comments on commit 1a79aef

Please sign in to comment.