Skip to content

Conversation

@stefanvanburen
Copy link
Member

On upgrade of a Swift plugin (with a Package.resolved file), clone the git repo, re-run swift package resolve, and copy the Package.resolved file to the directory. Basically, an automation of the steps described in #2161.

Also, bump golangci-lint to latest.

Fixes #1941.

On upgrade of a Swift plugin (with a `Package.resolved` file), clone the
git repo, re-run `swift package resolve`, and copy the
`Package.resolved` file to the directory. Basically, an automation of
the steps described in #2161.

Also, bump golangci-lint to latest.

Fixes #1941.
parts := strings.Fields(gitCloneCmd)
var repoDir string
for _, part := range parts {
if strings.HasPrefix(part, "https://") {
Copy link
Member Author

Choose a reason for hiding this comment

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

just a heuristic for the repo in the git clone line; we can loosen this over time if it doesn't work.

@stefanvanburen
Copy link
Member Author

Ran this on the commit before main, and saw that it created a Package.resolved that matched the manually created one I had in #2161.

Copy link
Member

@pkwarren pkwarren left a comment

Choose a reason for hiding this comment

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

Overall looks good. Just a suggestion on a different approach.

@stefanvanburen stefanvanburen merged commit 69dec06 into main Dec 16, 2025
3 checks passed
@stefanvanburen stefanvanburen deleted the svanburen/automate-swift-resolve branch December 16, 2025 19:58
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.

Pin Swift plugin dependencies

3 participants