-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: rename authors surname * refactor: rename error for usage clarity, add more detailed error description * refactor: append to last commit * docs: update documentation to most public methods for better understanding and usage * docs: minor text changes in readme * chore: add CHANGELOG.md
- Loading branch information
Showing
24 changed files
with
106 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [1.0.3] - 2021-07-22 | ||
|
||
### Added | ||
|
||
- `CHANGELOG.md` for a better overview regarding all releases. | ||
- Localized error description to error type for more clarity. | ||
|
||
### Changed | ||
|
||
- Renamed `Error` to `VersionValidationError` for better understanding when parsing an invalid string. | ||
- Updated and enhanced documentation on public methods and properties. | ||
|
||
## [1.0.2] - 2021-03-30 | ||
|
||
Fixed regex pattern for checking if string is alpha numeric or numeric. Removed minor typos and updated documentation. | ||
|
||
## [1.0.1] - 2021-03-30 | ||
|
||
Added missing documentation. Removed redundant methods. | ||
|
||
## [1.0.0] - 2021-03-30 | ||
|
||
Create a version object using a string or from component building a semantic version! You can also use the SemanticVersionComparable protocol to compare to version as much as you like or implement your own version object. | ||
|
||
## [0.6.0] - 2021-01-07 | ||
|
||
Initial published setup of this package. Create a version from string, using major, minor, patch and extensions, from Bundle or from ProcessInfo. Compare two versions with common operators (==, ===, <, <=, >, >=) or get the severity of an update. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
Sources/SwiftVersionCompare/Helper/VersionCompareResult.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
Sources/SwiftVersionCompare/Helper/VersionValidationError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// VersionValidationError.swift | ||
// SwiftVersionCompare | ||
// | ||
// Created by Marius Felkner on 29.12.20. | ||
// | ||
|
||
import Foundation | ||
|
||
enum VersionValidationError: Swift.Error { | ||
case invalidVersionIdentifier(identifier: String) | ||
} | ||
|
||
extension VersionValidationError: LocalizedError { | ||
var errorDescription: String? { | ||
switch self { | ||
case .invalidVersionIdentifier(let identifier): | ||
let format = NSLocalizedString( | ||
"The parsed string contained an invalid SemVer version identifier: '%@'.", | ||
comment: "" | ||
) | ||
|
||
return String(format: format, identifier) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.