Repository navigation
Make the project version one source of truth - #561
Merged
Merged
Conversation
paceholder
force-pushed
the
add-project-version
branch
from
November 29, 2026 14:17
606dfc3 to
ca902a1
Compare
paceholder
force-pushed
the
add-project-version
branch
3 times, most recently
from
November 29, 2026 16:03
9c27176 to
60fc9b9
Compare
Also update the copyright years to 2026.
paceholder
force-pushed
the
add-project-version
branch
from
November 29, 2026 16:12
60fc9b9 to
9d10824
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
The library had no version in its sources. The only version was the git tag, so a copy without
.git(a zip download, vendored files) could not tell its version.docs/conf.pystill saidrelease = '3.0'. There was also no way to ask for a version withfind_packageor#if.The version is now written once, in
project()ofCMakeLists.txt. Everything else comes from it:project(QtNodesLibrary VERSION 3.2.1 LANGUAGES CXX).QtNodesConfigVersion.cmakewithSameMajorVersion.find_package(QtNodes 3.1)accepts 3.2.1.find_package(QtNodes 4.0)rejects it.VERSIONandSOVERSIONon the target.QtNodes/VersiondefinesQTNODES_VERSION_MAJOR,_MINOR,_PATCH,QTNODES_VERSION_STR,QTNODES_VERSION_CHECK(a, b, c)andQTNODES_VERSION. It is generated into the build directory and installed.docs/conf.pyand Doxygen take the version fromCMakeLists.txt.CITATION.cffcannot be generated, because GitHub reads the committed file.CITATION.cffgives GitHub a "Cite this repository" button. The README points to it and no longer names a version.cmake/CheckVersion.cmakecomparesCITATION.cffwithproject(). CTest runs it, so CI fails a pull request that changes only one of them.To release: set the new version in
project()andCITATION.cff, then runcmake -P cmake/Tag.cmakeand push the tag. The script creates the annotated tag fromproject(). It refuses a version that is not higher than every local and remote tag, and does not push.AGENTS.mdand the README ("Releasing") describe this.docs/getting-started/installation.rstshows how to use the version.The commit also updates the copyright years to 2026:
LICENSE.rstand the README citation say2013-2026, anddocs/conf.pysays2026.Shared builds now get
SOVERSIONequal to the major version. On Linux the library file becomeslibQtNodes.so.3with alibQtNodes.solink. Static and Windows builds are not affected.Testing
TestVersion.cppfor the macros, and the CTest testversion_is_the_same_everywherecmake --install, thenfind_package(QtNodes 3.1 REQUIRED)finds 3.2.1 andfind_package(QtNodes 4.0 REQUIRED)reports an incompatible version.CheckVersion.cmakefails for a wrongCITATION.cffversion.Tag.cmakewas run in a throwaway clone with a separate bare remote: it refuses the same version, a lower version, a dirty tree, a higher tag that exists only on the remote and an unknown remote, and creates an annotated tag for a higher version.Breaking changes?
No.
Related issue
Part of the release housekeeping. Found while answering #464, where the reporter could not tell which version he had.