swift-package-info icon indicating copy to clipboard operation
swift-package-info copied to clipboard

Support passing branches, commits, etc

Open marinofelipe opened this issue 2 years ago • 1 comments

Currently the tool only support tags, and defaults to the latest tag, which doesn't work for all scenarios, e.g. when the latest tag doesn't contain a valid Package.swift in the repository root, as reported by @ipedro.

A concrete example is https://github.com/dzenbot/DZNEmptyDataSet.

The goal with this issue is to evaluate and add support for a more flexible approach, in which not only tags can be passed, but also branches, revision items, and where the behavior of the tool is a bit more predictable.

Some top of mind ideas for that would be to either:

  • Additional Optional argument(s), like branch and revision
  • Or update -v to be a wild card argument, that can be named either v, branch or revision, that allows passing any of those and smartly resolves it

marinofelipe avatar Apr 13 '22 21:04 marinofelipe

After #44 this got simpler, the SwiftPM lib has built in support for checking out a revision

marinofelipe avatar Jan 28 '24 18:01 marinofelipe

Shipped with the 1.5.0 release

marinofelipe avatar May 26 '24 20:05 marinofelipe