Skip to content

Support arbitrary SimpleITK versions.#90

Merged
zivy merged 1 commit intoSimpleITK:mainfrom
zivy:supportArbitraryTargets
Apr 30, 2026
Merged

Support arbitrary SimpleITK versions.#90
zivy merged 1 commit intoSimpleITK:mainfrom
zivy:supportArbitraryTargets

Conversation

@zivy
Copy link
Copy Markdown
Member

@zivy zivy commented Apr 30, 2026

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.

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.
@zivy zivy force-pushed the supportArbitraryTargets branch from 1084c53 to 01a6638 Compare April 30, 2026 00:27
@zivy zivy requested a review from blowekamp April 30, 2026 10:51
Copy link
Copy Markdown
Member

@blowekamp blowekamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@zivy zivy merged commit ebf6f78 into SimpleITK:main Apr 30, 2026
7 checks passed
@zivy zivy deleted the supportArbitraryTargets branch April 30, 2026 14:23
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.

2 participants