Update publish_release action to commit and push PrintVersion.swift changes if needed #975
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.
Related to #834
We had hoped that the version print issue would be fixed in the Swift 6.1 release, but unfortunately, it seems that it hasn’t been addressed.
As I understand it, swift-toolchain references swift-format by a specific branch(https://github.com/swiftlang/swift/blob/release/6.1/utils/update_checkout/update-checkout-config.json#L211), so the current behavior of the
publish_release
action — where the change toPrintVersion.swift
is included only in a tag and not pushed to a branch — means that the update doesn’t make it into the distributed toolchain 🤔This PR updates the
publish_release
action so that whenPrintVersion.swift
is updated, the change is committed and pushed to the branch as well.It seems like another possible approach could be to have
update-checkout-config
in Swift point to a tag of swift-format instead of a branch — but I’m not sure which option would be better.