forked from GitTools/GitVersion
-
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.
GitTools#2874 - added GitVersion.Scheme console that will generate th…
…e json schemas
- Loading branch information
Showing
20 changed files
with
1,032 additions
and
130 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://gitversion.net/schemas/6.0/GitVersion.json", | ||
"title": "GitVersion version variables output", | ||
"description": "GitVersion output schema", | ||
"type": "object", | ||
"properties": { | ||
"AssemblySemFileVer": { | ||
"description": "Suitable for .NET AssemblyFileVersion. Defaults to Major.Minor.Patch.0.", | ||
"type": "string" | ||
}, | ||
"AssemblySemVer": { | ||
"description": "Suitable for .NET AssemblyVersion. Defaults to Major.Minor.0.0", | ||
"type": "string" | ||
}, | ||
"BranchName": { | ||
"description": "The name of the checked out Git branch.", | ||
"type": "string" | ||
}, | ||
"BuildMetaData": { | ||
"description": "The build metadata, usually representing number of commits since the VersionSourceSha.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"CommitDate": { | ||
"description": "The ISO-8601 formatted date of the commit identified by Sha.", | ||
"type": "string" | ||
}, | ||
"CommitsSinceVersionSource": { | ||
"description": "The number of commits since the version source.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"EscapedBranchName": { | ||
"description": "Equal to BranchName, but with / replaced with -.", | ||
"type": "string" | ||
}, | ||
"FullBuildMetaData": { | ||
"description": "The BuildMetaData suffixed with BranchName and Sha.", | ||
"type": "string" | ||
}, | ||
"FullSemVer": { | ||
"description": "The full, SemVer 2.0 compliant version number.", | ||
"type": "string" | ||
}, | ||
"InformationalVersion": { | ||
"description": "Suitable for .NET AssemblyInformationalVersion. Defaults to FullSemVer suffixed by FullBuildMetaData.", | ||
"type": "string" | ||
}, | ||
"Major": { | ||
"description": "The major version. Should be incremented on breaking changes.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"MajorMinorPatch": { | ||
"description": "Major, Minor and Patch joined together, separated by \u0027.\u0027.", | ||
"type": "string" | ||
}, | ||
"Minor": { | ||
"description": "The minor version. Should be incremented on new features.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"Patch": { | ||
"description": "The patch version. Should be incremented on bug fixes.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"PreReleaseLabel": { | ||
"description": "The pre-release label is the name of the pre-release.", | ||
"type": "string" | ||
}, | ||
"PreReleaseLabelWithDash": { | ||
"description": "The pre-release label prefixed with a dash.", | ||
"type": "string" | ||
}, | ||
"PreReleaseNumber": { | ||
"description": "The pre-release number is the number of commits since the last version bump.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"PreReleaseTag": { | ||
"description": "The pre-release tag is the pre-release label suffixed by the PreReleaseNumber.", | ||
"type": "string" | ||
}, | ||
"PreReleaseTagWithDash": { | ||
"description": "The pre-release tag prefixed with a dash.", | ||
"type": "string" | ||
}, | ||
"SemVer": { | ||
"description": "The semantical version number, including PreReleaseTagWithDash for pre-release version numbers.", | ||
"type": "string" | ||
}, | ||
"Sha": { | ||
"description": "The SHA of the Git commit.", | ||
"type": "string" | ||
}, | ||
"ShortSha": { | ||
"description": "The Sha limited to 7 characters.", | ||
"type": "string" | ||
}, | ||
"UncommittedChanges": { | ||
"description": "The number of uncommitted changes present in the repository.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
}, | ||
"VersionSourceSha": { | ||
"description": "The SHA of the commit used as version source.", | ||
"type": "string" | ||
}, | ||
"WeightedPreReleaseNumber": { | ||
"description": "A summation of branch specific pre-release-weight and the PreReleaseNumber. Can be used to obtain a monotonically increasing version number across the branches.", | ||
"type": [ | ||
"integer", | ||
"null" | ||
] | ||
} | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
src/GitVersion.Core/Core/Attributes/JsonPropertyDescriptionAttribute.cs
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,16 @@ | ||
namespace GitVersion.Attributes; | ||
|
||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] | ||
public sealed class JsonPropertyDescriptionAttribute : JsonAttribute | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of <see cref="JsonPropertyDescriptionAttribute"/> with the specified property description. | ||
/// </summary> | ||
/// <param name="description">The description of the property.</param> | ||
public JsonPropertyDescriptionAttribute(string description) => Description = description; | ||
|
||
/// <summary> | ||
/// The description of the property. | ||
/// </summary> | ||
public string Description { get; } | ||
} |
Oops, something went wrong.