Skip to content

[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

Open
wants to merge 2 commits into
base: release/6.2
Choose a base branch
from

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jun 2, 2025

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).

@bnbarham bnbarham requested a review from a team as a code owner June 2, 2025 23:08
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.
Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea

Copy link
Member

@TTOzzi TTOzzi left a 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")
Copy link
Member

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"?

Copy link
Contributor Author

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
Copy link
Member

@TTOzzi TTOzzi Jun 3, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants