Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JohnSundell/Releases
A Swift package for resolving released versions from a Git repository
https://github.com/JohnSundell/Releases
package releases swift swift-package versioning xcode
Last synced: 4 months ago
JSON representation
A Swift package for resolving released versions from a Git repository
- Host: GitHub
- URL: https://github.com/JohnSundell/Releases
- Owner: JohnSundell
- License: mit
- Created: 2017-04-11T15:48:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-01T11:31:23.000Z (about 2 years ago)
- Last Synced: 2024-05-13T15:05:03.874Z (6 months ago)
- Topics: package, releases, swift, swift-package, versioning, xcode
- Language: Swift
- Size: 28.3 KB
- Stars: 51
- Watchers: 5
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 🚢 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:
```swift
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):
```swift
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?
- [Open a PR](https://github.com/JohnSundell/Releases/pull/new/master) if you want to make some change to Releases.
- Contact [@johnsundell on Twitter](https://twitter.com/johnsundell) for discussions, news & announcements about Releases & other projects.