Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0] Set the library version reported via CMake to 6.0. #638

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Aug 22, 2024

Explanation: Sets the version of the library as built in CMake to "6.0".
Scope: 6.0 releases built with CMake instead of SwiftPM
Issue: N/A
Original PR: #637
Risk: Low
Testing: Manually tested at desk and in a toolchain build as we don't have CI jobs using CMake yet. See swiftlang/swift#76034
Reviewer: @compnerd @briancroom

This PR updates the version reported when using CMake (i.e. when building in the
toolchain) to 6.1.0-dev with optional trailing git status information, if
available. The resulting string looks like:

> 6.1.0-dev (0.0.0-initial-532-gd01c406 - modified)

"0.0.0-initial-532-gd01c406" in this example refers to the most recent commit
on the branch I was testing on via `git describe --tags`, and "modified" is
present because I had uncommitted changes.

(We'll want to double-check that CMake used in CI can see the git repository and
has access to the git tool.)
@grynspan grynspan added swift-6 build Affects the project's build configuration or process labels Aug 22, 2024
@grynspan grynspan self-assigned this Aug 22, 2024
@grynspan
Copy link
Contributor Author

@swift-ci test

OUTPUT_VARIABLE GIT_STATUS
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(GIT_STATUS)
set(GIT_VERSION "${GIT_VERSION} - modified")
Copy link
Member

Choose a reason for hiding this comment

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

I've usually seen the suffix -dirty for this purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔 nsfw

Copy link
Member

Choose a reason for hiding this comment

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

Okay, that's reasonable, different places have different sensitivities to that. Let's stick with what you have.

@grynspan grynspan force-pushed the jgrynspan/cmake-version-6.0 branch from 1e145c8 to 2bf0461 Compare August 22, 2024 15:14
@grynspan grynspan changed the title [6.0] Set the library version reported via CMake to 6.0.0. [6.0] Set the library version reported via CMake to 6.0. Aug 22, 2024
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan merged commit b118feb into release/6.0 Aug 23, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/cmake-version-6.0 branch August 23, 2024 20:25
grynspan added a commit that referenced this pull request Aug 23, 2024
**Explanation:** Sets the version of the library as built in CMake to
"6.0".
**Scope:** 6.0 releases built with CMake instead of SwiftPM
**Issue:** N/A
**Original PR:** #637
**Risk:** Low
**Testing:** Manually tested at desk and in a toolchain build as we
don't have CI jobs using CMake yet. See
swiftlang/swift#76034
**Reviewer:** @compnerd @briancroom
grynspan added a commit that referenced this pull request Aug 23, 2024
**Explanation:** Sets the version of the library as built in CMake to
"6.0".
**Scope:** 6.0 releases built with CMake instead of SwiftPM
**Issue:** N/A
**Original PR:** #637,
#638
**Risk:** Low
**Testing:** Manually tested at desk and in a toolchain build as we
don't have CI jobs using CMake yet. See
swiftlang/swift#76034
**Reviewer:** @compnerd @briancroom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Affects the project's build configuration or process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants