Skip to content

build(cmake): read Source_Version before git describe - #437

Open
jolavillette wants to merge 1 commit into
RetroShare:masterfrom
jolavillette:fix/cmake-source-version-first
Open

jolavillette wants to merge 1 commit into
RetroShare:masterfrom
jolavillette:fix/cmake-source-version-first

Conversation

@jolavillette

@jolavillette jolavillette commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

A source tarball stores libretroshare's git describe in Source_Version (#385), but CMake read the file only when git failed. When the tarball is unpacked inside another git repository, git succeeds there and describes that repository: built from a git-buildpackage repository (the usual way Debian packages are maintained), the engine hash became the packaging tag (debian/0.6.8+ds-1-dirty), and the version too when that repository carries v*.*.* tags.

Now Source_Version is read first when it exists, git otherwise, for both the version and the engine hash. A plain git checkout has no Source_Version file, so nothing changes there.

The GUI side of the same fix is in RetroShare/RetroShare#3308.

A source tarball carries libretroshare's `git describe` in Source_Version,
but the file was read only when git failed. When the tarball is unpacked
inside another git repository (git-buildpackage, or any checkout), git
succeeds there and describes that repository instead: the engine hash
became the packaging tag (e.g. debian/0.6.8+ds-1-dirty), and when the
enclosing repository carries v*.*.* tags (gbp with upstream history) the
version did too. Read the file first when it exists, git otherwise, for
both the version and the engine hash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant