Support arbitrary SimpleITK versions.#90
Merged
zivy merged 1 commit intoSimpleITK:mainfrom Apr 30, 2026
Merged
Conversation
Add an entry to the DESCRIPTION that indicates the committish we want to use to build the package. Then run the sitk_r_version_date.sh script to derive the version and date from the committish and patch the DESCRIPTION file accordingly. This allows us to build the R package for any arbitrary version of SimpleITK, including development versions that do not have an official release tag. Because the Version field in the DESCIPTION file expects a specific format it may not match an official release version so the closest version is computed. For example, if the target is a hash that appears after release 2.5.3 but before 2.5.4 then it will be assigned version 2.5.4.9000 with the date of the commit. If it is a tag from an official release (vMAJOR.MINOR.PATCH)then that version is used directly. All tags with trailing non numeric characters will be treated as development versions. That means 3.0.0a1, 3.0.0a2 will both be assigned version 3.0.0.9000 with the date of the commit. The 9000 suffix denotes "in development" in the R universe, see https://r-pkgs.org/lifecycle.html#dev-version.
1084c53 to
01a6638
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.
Add an entry to the DESCRIPTION that indicates the committish we want to use to build the package. Then run the sitk_r_version_date.sh script to derive the version and date from the committish and patch the DESCRIPTION file accordingly. This allows us to build the R package for any arbitrary version of SimpleITK, including development versions that do not have an official release tag.
Because the Version field in the DESCIPTION file expects a specific format it may not match an official release version so the closest version is computed. For example, if the target is a hash that appears after release 2.5.3 but before 2.5.4 then it will be assigned version 2.5.4.9000 with the date of the commit. If it is a tag from an official release (vMAJOR.MINOR.PATCH)then that version is used directly. All tags with trailing non numeric characters will be treated as development versions. That means 3.0.0a1, 3.0.0a2 will both be assigned version 3.0.0.9000 with the date of the commit.
The 9000 suffix denotes "in development" in the R universe, see https://r-pkgs.org/lifecycle.html#dev-version.