Open ahoppen opened 4 months ago
Synced to Apple’s issue tracker as rdar://129223520
We should be able to do this by
Context.gitInformation?.currentCommit
in the package manifest-D
Context.gitInformation?.currentCommit
is only available with swift-tools-version 6.0, so we can only do this after we require Swift 6 (because I don’t want to have two different package manifests to maintain just for this feature).
Ideally, this would output the corresponding Swift version (eg. 6.0) and the commit hash from which it was built. Maybe we can use a build plugin to get the commit hash and the Swift version from the current branch name.