Using Releases you can easily resolve all released versions from a Git repository, in either a Swift script or command line tool. It supports both remote & local repositories and provides convenience APIs for sorting, filtering out pre-released versions, etc.
Releases.versions(for: url) and you'll get an array of
let url = URL(string: "https://github.com/johnsundell/unbox")! let releases = Releases.versions(for: url) // Print the latest version print(releases.last)
Remove all pre-release versions (like
let url = URL(string: "https://github.com/johnsundell/unbox)! let releases = Releases.versions(for: url).withoutPreReleases() // Print the latest stable version print(releases.last)
.package(url: "https://github.com/JohnSundell/Releases.git", from: "5.0.0")to your
$ swift package update.
|Last commit: 4 weeks ago|
Releases now uses Swift 5.1.
View build details and download artifacts on buddybuild: Releases (iOS, Releases - Debug)