-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sanity check on version in CMakeLists.txt file #1224
Conversation
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
514b7a8
to
53ea139
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, did you consider sanity checking against the package.xml version with https://github.com/gazebosim/gz-cmake/blob/gz-cmake4/tools/print_package_xml_version.py ?
The main reason is that package.xml files are only available in Harmonic and later, but we'll be using |
Signed-off-by: Addisu Z. Taddese <[email protected]>
That's reasonable while we are still supporting Fortress. One other difference between the versions from cmake and package.xml is that package.xml doesn't have prerelease version suffixes. After Fortress, would we be happier parsing from package.xml? Can parse from both now (with this PR and a separate one for package.xml) and consider removing the cmake version parsing later? |
this check doesn't currently work with prereleases. To test, I added a dummy commit gazebo-release/gz-math8-release@249841b in branch
and ran the following command:
|
Signed-off-by: Addisu Z. Taddese <[email protected]>
I've updated the script to support prereleases.
As you said, this wouldn't work for prereleases, so I'd imagine we'd keep using the CMake version. |
I suppose we could replace the |
If we're going to have the CMakeLists logic for two years (until Fortress is EOL), I'm not sure why we would add the extra code to handle package.xml. If we want to do a sanity check on the package.xml, that'd be be one thing, but that's handled by our CI when making version bump PRs in preparation for the release. I'd like a ✅ from @j-rivero before merging since |
The current calls in Jenkins are related:
|
release.py
Outdated
@@ -381,6 +420,8 @@ def sanity_checks(args, repo_dir): | |||
if not NIGHTLY: | |||
sanity_package_version(repo_dir, args.version, str(args.release_version)) | |||
sanity_check_sdformat_versions(args.package, args.version) | |||
if not (args.bump_rev_linux_only or args.source_repo_uri): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args.source_repo_uri
is designed to provide exact repository URI instead of retrieving it from the local github checkout. Nothing to do with the CMakeListst.txt bussiness I think.
You probably want to use here args.source_tarball_uri
that represents an existing source stored out of the system. In that case the check for a local CMakeLists.txt
file has less sense unless we download and unzip the tarball.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this in c783ff8
Works for me using ign-gazebo6 6.17.0 |
It the version in the local CMakeLists.txt file doesn't match the intended release version, released.py currently starts the source job, which gives the false impression that everything is working well. However, the source job will fail and debbuilder jobs are never triggered. This patch adds a sanity check so that released.py fails if the release version doesn't match what's in CMakeLists.txt.
To test the script can parse versions correctly, I ran the following from the directory containing
release.py
: