PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 9, 2022

[FIXED] How to trigger Xcode's 'Update to Latest Package Versions' from command line?

 October 09, 2022     continuous-integration, swift, swift-package-manager, xcode     No comments   

Issue

Goal:

I want to programmatically update the versions of Swift Packages consumed by a sample project.

Problem:

Xcode > 11 offers a menu option:

File > Swift Packages > Update to Latest Package Versions

This will update the Package.resolved file to point to a specific revision.

This file is located at:

MyProject.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

How can I trigger this action from the command line for a CI build?


Solution

Wound up abandoning this route since ideally CI tests what GOING to be in the repo instead of what IS in the repo.

End solution wound up being to point to a dummy branch and then force push the CI-generated merge commit to that branch.

It's a little hacky but gives accurate feedback on how the package will be consumed post-merge.

Update: Was able to find a way better solution. https://stackoverflow.com/a/61110638/2565025



Answered By - Joe Susnick
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing