-
Notifications
You must be signed in to change notification settings - Fork 247
[6.2] Check version has been updated when publishing a release #1029
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
base: release/6.2
Are you sure you want to change the base?
Conversation
Rather than updating the version, check that it has been. We need the update in the branch itself so that the toolchain version is also updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking care of this!
print("main") | ||
print("6.2.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more appropriate if it were in the form of "602.0.0"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, this is an interesting point. We really have two versions here - one is swift-format as a library, using the same semantic versioning as swift-syntax. Another is swift-format in the toolchain, which uses the toolchain versioning scheme.
Which also means the check I added here doesn't work 🤔
@@ -67,6 +67,9 @@ jobs: | |||
echo "swift_format_version=$SWIFT_FORMAT_VERSION" >> "$GITHUB_OUTPUT" | |||
- name: Checkout repository | |||
uses: actions/checkout@v4 | |||
- name: Check version matches | |||
run: | | |||
grep '"${{ steps.swift_format_version.outputs.swift_format_version }}"' Sources/swift-format/PrintVersion.swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also take into account the prerelease format, such as "602.0.0-prerelease-$(date +'%Y-%m-%d')"
🤔
Or, to avoid being affected by prerelease variations, it might be better to use github.event.inputs.swift_format_version
instead of steps.swift_format_version.outputs.swift_format_version.
Rather than updating the version, check that it has been. We need the
update in the branch itself so that the toolchain version is also
updated.
Also update the version itself (currently main).