Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a scriptlet to the "gutenprint" part in snapcraft.yaml to do an automatic versioning. The use of the scriptlet is made use of by the "adopt-info: gutenprint" entry in snapcraft.yaml. It follows a versioning policy like this (which is very similar to the one of Debian packages): - Base version is the upstream version of the included Gutenprint. Revisions which keep the included Gutenprint version but do other changes, like build method patches, the other included software packages, like Ghostscript, cups-filters, ... increase the added package release number, which is added to the upstream version number with a dash. Current version number is 5.3.4-1. - To grab a GIT snapshot between releases, the "source-tag: ..." line has to get commented out. to get the top of the GIT repository. In this case the upstream version number is the version number of the last Gutenprint release with added "+gitN.gXXXXXXXXX", where N is the number of commits which happened after the release and XXXXXXXXX is the commit ID. N is important to make the version number of a newer commit actually be considered newer (not tested yet). - If a new Snap is built with the same upstream version of the newest Snap currently in the Snap Store, the package release number is automatically increased by 1. In case of a new upstream release being used, the package release number will get reset to 1. - To reliably determine the version number of the currently available Snap and to avoid random package release number increases for each architecture, we always check the current version number of the Snap of the same architecture which we are currently building for. - We do not bump the package release number if the current upload in the Snap Store is newer than the last GIT commit, as that would mean that the auto build is not triggered by the GIT commit but by clicking the "Rebuild" button in the Snap Store's web interface, meaning that we are doing a no-change-rebuild. Then we do not want to have a new package release number. - Snaps built of released Guenprint Debian package versions are considered stable and get the "stable" grade and Snaps based on GIT snapshots are considered development snapshots and get the "devel" grade. - Grade and package release number can get manually overridden. - Added jq and libtool-bin to the `build-packages:` of the "gutenprint" part. They are needed for the versioning automation. - Updated Gutenprint `./configure` parameters to skip building the documentation, which is not needed in the Snap - Updated Ghostscript `./configure` parameters to exclude components unnecessary for this Snap. This kind of versioning is also planned to be used by the other Snaps at OpenPrinting. It is especially suitable also if the Snap packaging is a repository separate from the underlying upstream project. The versioning is especially introduced now to get a consistent versioning of the Snaps, especially also as we are working towards Ubuntu Core Desktop, an all-Snap Desktop distribution. After some testing we are also considering to move versioning automation into the ubuntu/desktop-snaps GitHub action (the one hosting Snap update automation on new upstream releases) to apply this automation on a wider range of Snaps.
- Loading branch information