-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix Package.swift #1751
Fix Package.swift #1751
Conversation
Improves prompt asking to force move tag (default is NO, but can be triggered after `make release`). Fixes issues with single quotes in make-release-package.sh.
Unit tests fail, probably on git describe:
|
Yes indeed! I've seen that too and I'm thinking I should either put that behind a check whether we're running GitHub actions or move it to the release-move-tag.sh script. Have the GitHub actions replaced the |
Only check and update tag in Package.swift when not running a CI build. As long as GitHub actions are reserved for tests, this should be ok as this is a "fake" update of Package.swift anyway. If you ever use GitHub actions for releases, you'll probably have to rethink the tagging logic once again
(changes look reasonable on my end, will trust best judgement here) |
Now provides an error and exits when not complying with SemVer
I'll do the change for the 2.x branch ASAP, but this fixes the showstopping bug in #1750. Major change is that Package.swift now uses the latest tag instead of the version number so it can be used for pre-release versions as well. It still includes the "final" version number even though it is not used in any way anymore.
IMPORTANT: it seems that during the release of
1.25.0-rc1
two things were overlooked:1.25.0rc1
does not follow semantic versioning whereas1.25.0-rc1
does. I've updated make-release-package.sh to check whether the latest tag follows semantic versioning based on a modified version of the "official" RegEx: https://semver.org/. It outputs a warning if the tag does not follow semantic versioning. In that case, you should delete the tag, tag again and runmake release
again.make release
defaults to no and seems to have been overlooked. As there are other safeguards in place (only moves the tag when nothing else has been committed), it now defaults to yes.Fixes #1750
Checklist:
Type of change
Testing
I tested and verified my change by using one or multiple of these methods:
make release
with tag1.25.0-rc2
, successfully moves the tag and uses the correct url in Package.swiftmacOS version tested: 11.2