Swift Package Index


A Swift package for resolving released versions from a Git repository


  • The latest stable release is 5.0.0. Released about 1 year ago.
  • The last commit to master was about 1 year ago.

Swift Version Compatibility

  • 5.0.0 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 5.0.0 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

🚢 Releases

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.

Usage

Simply call Releases.versions(for: url) and you'll get an array of Version back:

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 Alpha, Beta, etc):

let url = URL(string: "https://github.com/johnsundell/unbox)!
let releases = Releases.versions(for: url).withoutPreReleases()

// Print the latest stable version
print(releases.last)

Installation

  • Add .package(url: "https://github.com/JohnSundell/Releases.git", from: "5.0.0") to your Package.swift file's dependencies.
  • Update your packages using $ swift package update.

Help, feedback or suggestions?