Skip to content
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 being updated after tag #1710

Merged
merged 5 commits into from
Jan 5, 2021

Conversation

thebluepotato
Copy link
Contributor

@thebluepotato thebluepotato commented Jan 5, 2021

TL/DR; This PR should fix #1674.

What it does

Adds a simple script called release-move-tag.sh under Configurations. It runs as a separate step in make release.

I chose to have it as a separate script to improve readability and to allow Xcode to build the Distribution target without invoking anything tag-related.

The script checks that there have been no commits since latest tag to prevent accidentally moving an old tag. Indeed, the script expects to be run after tagging the release just before make release, so there should be no commits in-between.

Tests

I've tested the following successfully:

  • Bump version in ConfigCommon.xcconfig and Sparkle.podspec
  • Commit and tag
  • make release and approve moving the tag

It all seemed ok to me. All that would be left is pushing to remote and uploading the corresponding artifacts (including the ZIP for SPM).

Up for review

I thought about adding some version checks but it seems a little overkill as it seems already safe enough. The script actually asks for user approval before moving the tag. Accordingly, make release requires one interaction if we are really releasing (and asks so before opening the directory with the assets to be uploaded). We could also remove the interaction entirely and just commit Package.swift and move the tag whenever there have been no commits since latest tag.

I've added comments that are up for review. Naturally, once the changes are approved, I'll do the same on the 2.x branch (EDIT: now available #1711).

Prevents re-tagging when there are more than one commits since latest tag (to prevent accidentally moving an old tag)
Fixes commit counting logic, some typos and logs more info.
thebluepotato added a commit to thebluepotato/Sparkle that referenced this pull request Jan 5, 2021
Fixes the issue of Package.swift being updated after tag, see sparkle-project#1710.
@kornelski kornelski merged commit 0652027 into sparkle-project:master Jan 5, 2021
@thebluepotato thebluepotato deleted the fix-catch-22 branch January 5, 2021 15:15
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.

SwiftPM binary target checksum catch-22
2 participants