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

d/rules: test for version mismatch #3155

Closed panlinux closed 3 months ago

panlinux commented 3 months ago

Fixes: #3154

Why is this needed?

This prevents package builders and uploaders from forgetting to also update the VERSION in uaclient/version.py if a new upstream version is created. Since this is a native package in ubuntu, every single upload will be a new upstream version as well.

Test Steps

Change version in d/changelog to something different from uaclient/version.py's VERSION, and build the package. The build should fail.

Checklist

Does this PR require extra reviews?

github-actions[bot] commented 3 months ago

Jira: This PR is not related to a Jira item. (The PR title does not include a SC-#### reference)

GitHub Issues:

Launchpad Bugs: No Launchpad bugs are fixed by this PR. (No commits have LP: #### references)

Documentation: The changes in this PR do not require documentation changes.

👍 this comment to confirm that this is correct.

panlinux commented 3 months ago

The script tools/check-versions-are-consistend.py doesn't work for GH builds, because they add an ubuntu1 suffix:

$ python3 tools/check-versions-are-consistent.py 
version.py says "32.3" but changelog says "32.3ubuntu1~1.gbp761c11~noble1"

Maybe we could remove that ubuntu1 suffix, I don't know where it's added, but doesn't seem necessary and might be old cruft.

renanrodrigo commented 3 months ago

I'm completely up for removing the suffix - just need to check the impact this would have to our daily builds on LP though

panlinux commented 3 months ago

Where is that suffix added?