app_changelog 1.2.0
app_changelog: ^1.2.0 copied to clipboard
One changelog. Every platform. A platform-aware CHANGELOG.md parser for shared and platform-specific Flutter app release notes.
1.2.0 #
dart run app_changelog versionprints the newest version inCHANGELOG.md, ready forflutter build --build-name. Pass--platform iosfor one platform or--platform ios,androidforplatform=versionlines. Without--platform, it reads the project's platform folders.dart run app_changelog checkfails a release when the changelog can't be parsed, a platform has no release or no notes, orpubspec.yamlis ahead of the changelog. It warns whenInfo.plistdoesn't read$(FLUTTER_BUILD_NAME), since--build-namethen won't change the iOS or macOS version.- Both commands skip pre-releases unless
--pre-releasesis passed, and read another changelog with--path. - The README's CI/CD section uses the new commands.
example/ci_latest_version.dartis removed, sinceversionreplaces it.
1.1.0 #
AppChangelog.track()remembers the last version whose release notes the user has seen, stored withshared_preferences. Call it once beforerunApp.AppChangelog.isNewInstallandAppChangelog.didUpdatetell a new install from an update, andAppChangelog.previousVersionreturns the last version marked as seen.AppChangelog.markVersionSeen()stores the installed version as seen. It never stores a lower version.AppChangelog.unseenReleases()returns every release since the last version marked as seen, so users who skip versions see everything they missed.isExistingInstalllets apps that add tracking after launch count current users as updated, andread/writereplaceshared_preferenceswith your own storage.
1.0.0 #
- Initial release.
- Markdown
CHANGELOG.mdparsing with shared releases (## 1.2.3), platform-specific releases (## @ios: 1.2.3), optional###titles, and platform-specific changes (- @ios: ...). - Optional release dates in headings (
## 1.2.3 - 2024-01-31), exposed asdate. - Stacked platform headings (
## @android: 1.2.1followed by## @ios: 1.0.1) that share one set of notes across different platform versions. AppChangelog.find,latestFor, andreleasesForreturn notes already filtered for a platform.AppChangelog.load()readsCHANGELOG.mdby default (override withpath:), from the asset bundle in a Flutter app or the file system in adart runscript.- Static helpers:
AppChangelog.currentRelease()returns the installed version's notes for the current platform in one call,AppChangelog.latestRelease()the newest release, andAppChangelog.currentPlatformthe running platform. The installed version is read withpackage_info_plus, so apps don't need to add it themselves. - Semantic version ordering with pre-release support.
- Validation for duplicate and ambiguous releases, mismatched platform scopes, and malformed input, with line numbers in error messages.