-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#37 Add a domain model for semantic versions
- SemVer has fields for PreRelease and BuildMetadata suffixes - SemVer has parsing/writing functions - add respective flat fields to ValidationPackageMetadata - add respective static methods to ValidationPackageMetadata and ValidationPackageIndex - added tests
- Loading branch information
Showing
10 changed files
with
630 additions
and
101 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
namespace AVPRIndex | ||
|
||
open System.Text | ||
open System.Text.RegularExpressions | ||
|
||
module Globals = | ||
|
||
let [<Literal>] STAGING_AREA_RELATIVE_PATH = "StagingArea" | ||
let [<Literal>] STAGING_AREA_RELATIVE_PATH = "StagingArea" | ||
|
||
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string | ||
let [<Literal>] SEMVER_REGEX_PATTERN = @"^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$" | ||
|
||
let SEMVER_REGEX = new Regex(SEMVER_REGEX_PATTERN) |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ type Hash = | |
path | ||
|> File.ReadAllText | ||
|> Hash.hashString | ||
|
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.