fix(version): look up the monthly tag without the v prefix - #5
Merged
Merged
Conversation
tools/version.sh only recognized a 'v'-prefixed monthly tag (v26.09), but the project tags are bare (26.09), matching the convention sas_py's setuptools-git-versioning builds PyPI versions from. As a result the rolling component was always 00 and the .deb/CMake version stayed 26.09.00 while main kept moving. Look up the monthly tag as 'YY.MM' first and fall back to 'vYY.MM'. Verified: with 5 commits after 26.09 the script now reports 26.09.05 (previously 26.09.00); missing tag still reports 26.09.00; a v-prefixed tag alone still works via the fallback. Co-authored-by: openhands <openhands@all-hands.dev>
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.
What this does
Fixes the rolling-version computation so the
libmarinholab-sas-core.deb (and the CMake package version) actually trackmaininstead of staying pinned at26.09.00.Problem
tools/version.shlooks up the monthly version tag asv${YY.MM}(e.g.v26.09), but the project's tags are bare (26.09):26.09(annotated →d488bb68), novprefix.sas_pyrelies on: itssetuptools-git-versioningusesdev_template = "{tag}.{ccount}", which is why PyPI shows26.9.4/26.9.5from tag26.09.Because
refs/tags/v26.09never exists,NNwas always0→version.shalways returned26.09.00, so:tools/bump-changelog.shnever bumpeddebian/changelog(idempotent no-op),26.09.00while the branch content moved,cmake/GetVersion.cmake(which runstools/version.sh) reported the same stale version.With 5 commits after
26.09onmain, the version should have been26.09.05.Fix
tools/version.shnow looks up the monthly tag asYY.MMfirst,vYY.MMas a fallback — accepting either naming, preferring the project's actual (bare) convention. No tag renaming (renaming tov26.09would breaksas_py's PyPI versioning, which expects the bare tag).Single-file change (
tools/version.sh); all consumers —bump-changelog.sh,cmake/GetVersion.cmake,docker/build.sh— funnel through it, so they all benefit with no changes of their own.Verification
bash tools/version.shon a clone ofmain(5 commits after26.09):26.09.05(previously26.09.00).26.09.00(unchanged safe behavior).v26.09present →26.09.05(fallback works).tools/bump-changelog.shconsumes the sameversion.shoutput, sodebian/changelogwill now be stamped26.09.05beforedpkg-buildpackage(thedchstep is exercised in thesas_cppdocker env /SmartArmStack/smart_arm_stack_ROS2PR fix(version): look up the monthly tag without the v prefix #5, wheredevscriptsis installed).Effect
SmartArmStack/smart_arm_stack_ROS2PR fix(version): look up the monthly tag without the v prefix #5 (which runstools/bump-changelog.sh+dpkg-buildpackage) will now producelibmarinholab-sas-core_26.09.NN, so the PPA version moves withmain— no more "static version, moving content" caveat.SmartArmStack/sas_corePR Accept a dqrobotics::dqrobotics target from a parent project #12's in-image build (pinned at tag26.09) is unaffected: at the tag,NN = 0→26.09.00exactly as before.This pull request was created by an AI agent (OpenHands) on behalf of the repository owner.