Add git information to PD context#7202
Merged
Merged
Conversation
This adds a few bits of information about a package's git repository to the context accessible to package manifests: - the current commit - the current tag (if any) - whether or not there are uncommited changes rdar://111523616
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please test windows |
Contributor
Author
|
@grynspan added you since you asked for this kind of functionality in the context of swift-testing, so trying to make sure we can cover your use case as well |
Contributor
Author
|
@swift-ci please test windows |
3 similar comments
Contributor
Author
|
@swift-ci please test windows |
Contributor
Author
|
@swift-ci please test windows |
Contributor
Author
|
@swift-ci please test windows |
MaxDesiatov
reviewed
Dec 15, 2023
Contributor
|
This would definitely meet our needs and let us replace our GitStatus compiler plugin. Thanks! |
grynspan
reviewed
Jan 3, 2024
grynspan
approved these changes
Jan 11, 2024
Co-authored-by: Max Desiatov <m_desiatov@apple.com>
MaxDesiatov
approved these changes
Jan 11, 2024
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
@swift-ci please test windows |
2 similar comments
Contributor
Author
|
@swift-ci please test windows |
Contributor
Author
|
@swift-ci please test windows |
2 tasks
grynspan
added a commit
to swiftlang/swift-testing
that referenced
this pull request
Jan 24, 2024
A recent PR on Swift Package Manager (swiftlang/swift-package-manager#7202) added a `gitInformation` property to the package manifest's `Context` global. This property contains exactly the information we need from the GitStatus plugin. Let's remove it, then! Adopting the `gitInformation` property requires that we drop remaining support for Swift 5.10. We will continue to minimally support it in a separate Package.swift file (where we simply won't have git repo information at build time.) This PR does not strip out other 5.10 support code such as `XCTestScaffold`. Resolves rdar://121529847.
grynspan
added a commit
to swiftlang/swift-testing
that referenced
this pull request
Jan 25, 2024
A recent PR on Swift Package Manager (swiftlang/swift-package-manager#7202) added a `gitInformation` property to the package manifest's `Context` global. This property contains exactly the information we need from the GitStatus plugin. Let's remove it, then! Adopting the `gitInformation` property requires that we drop remaining support for Swift 5.10. We will continue to minimally support it in a separate Package.swift file (where we simply won't have git repo information at build time.) This PR does not strip out other 5.10 support code such as `XCTestScaffold`. Resolves rdar://121529847.
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.
This adds a few bits of information about a package's git repository to the context accessible to package manifests:
rdar://111523616