Similar to rpmautospec, but for LINBIT-flavored projects.
TL;DR, use this in projects:
# For spec files
$ lbautospec rpm generate project.spec.in > project.spec
# For debian changelog
$ lbautospec deb changelog > debian/changelogFor RPM spec files, the generate subcommand replaces the @VERSION@ and @CHANGELOG@ placeholders in the .spec.in file with the actual version and generated changelog.
The version is the latest git tag, with a potential v prefix removed, and -rc replaced by ~rc.
The changelog for spec files as well as debian/changelog is generated from git; every tag gets its own changelog entry.
There are also subcommands to generate only the version and changelog. Mostly useful for debugging, maybe also for scripting.
$ lbautospec rpm version
1.5.1
$ lbautospec rpm changelog
* Mon Feb 05 2024 Christoph Böhmwalder <christoph.boehmwalder@linbit.com> - 1.5.1-1
- Release v1.5.1
* Thu Jan 11 2024 Christoph Böhmwalder <christoph.boehmwalder@linbit.com> - 1.5.1~rc.1-1
- Release v1.5.1-rc.1
* Thu Jan 11 2024 Christoph Böhmwalder <christoph.boehmwalder@linbit.com> - 1.5.0-1
- Release v1.5.0
[...]The key differences are:
rpmautospecis designed specifically for RPM spec files, whilelbautospecalso supports Debian changelogs.lbautospecalso populates theVersion:field in the spec file, not just the release and changelog.- We use specific conventions for versioning and changelog formatting at LINBIT, which
lbautospecadheres to.