canonical / ubuntu-pro-client

Ubuntu Pro Client for offerings from Canonical
https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
52 stars 73 forks source link

Bug: package build should fail if version.py does not match version in d/changelog #3154

Closed panlinux closed 3 months ago

panlinux commented 3 months ago

Description of the bug

It has happened a few times to me already where I propose a change to the Ubuntu package of ubuntu-pro-client and forget to update uaclient/version.py with the new version. The build process should check for that and fail if both versions do not match.

Expected behavior If, for example, the version in d/changelog is 32.3.1, and uaclient/version.py has 32.3, then the build should fail. This should take into account, and remove, the backport suffix.

Current behavior The build proceeds.

To Reproduce

The build should fail.

System information:

Additional context We may discuss if this should be a unit test instead, but I feel it's tied to packaging, and build-time tests can be skipped.