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

Add git information to PD context #7202

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Add git information to PD context #7202

merged 3 commits into from
Jan 11, 2024

Conversation

neonichu
Copy link
Contributor

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

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
@neonichu neonichu self-assigned this Dec 14, 2023
@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@neonichu
Copy link
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

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

3 similar comments
@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@grynspan
Copy link
Contributor

grynspan commented Jan 3, 2024

This would definitely meet our needs and let us replace our GitStatus compiler plugin. Thanks!

@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

2 similar comments
@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@neonichu neonichu merged commit cb04409 into main Jan 11, 2024
5 checks passed
@neonichu neonichu deleted the add-git-info-to-context branch January 11, 2024 22:11
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants