Skip to content

Commit e4a557c

Browse files
authored
Merge pull request #1405 from pmiossec/add_short_sha
Add "ShortSha" to the data provided by GitVersion
2 parents 0ce94c8 + 36c36f5 commit e4a557c

26 files changed

+62
-22
lines changed

docs/more-info/variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ For the `release/3.0.0` branch of GitVersion it shows:
2424
"InformationalVersion":"3.0.0-beta.1+1.Branch.release/3.0.0.Sha.28c853159a46b5a87e6cc9c4f6e940c59d6bc68a",
2525
"BranchName":"release/3.0.0",
2626
"Sha":"28c853159a46b5a87e6cc9c4f6e940c59d6bc68a",
27+
"ShortSha":"28c8531",
2728
"NuGetVersionV2":"3.0.0-beta0001",
2829
"NuGetVersion":"3.0.0-beta0001",
2930
"NuGetPreReleaseTagV2":"beta0001",

src/GitVersionCore.Tests/Approved/JsonVersionBuilderTests.Json.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.0-unstable.4+5.Branch.feature1.Sha.commitSha",
2020
"BranchName":"feature1",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.0-unstable0004",
2324
"NuGetVersion":"1.2.0-unstable0004",
2425
"NuGetPreReleaseTagV2":"unstable0004",

src/GitVersionCore.Tests/Approved/VariableProviderTests.ProvidesVariablesInContinuousDeliveryModeForPreRelease.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.3-unstable.4+5.Branch.develop.Sha.commitSha",
2020
"BranchName":"develop",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.3-unstable0004",
2324
"NuGetVersion":"1.2.3-unstable0004",
2425
"NuGetPreReleaseTagV2":"unstable0004",

src/GitVersionCore.Tests/Approved/VariableProviderTests.ProvidesVariablesInContinuousDeliveryModeForPreReleaseWithPadding.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.3-unstable.4+5.Branch.develop.Sha.commitSha",
2020
"BranchName":"develop",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.3-unstable00004",
2324
"NuGetVersion":"1.2.3-unstable00004",
2425
"NuGetPreReleaseTagV2":"unstable0004",

src/GitVersionCore.Tests/Approved/VariableProviderTests.ProvidesVariablesInContinuousDeliveryModeForStable.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.3+5.Branch.develop.Sha.commitSha",
2020
"BranchName":"develop",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.3",
2324
"NuGetVersion":"1.2.3",
2425
"NuGetPreReleaseTagV2":"",

src/GitVersionCore.Tests/Approved/VariableProviderTests.ProvidesVariablesInContinuousDeploymentModeForPreRelease.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.3-unstable.5+Branch.develop.Sha.commitSha",
2020
"BranchName":"develop",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.3-unstable0005",
2324
"NuGetVersion":"1.2.3-unstable0005",
2425
"NuGetPreReleaseTagV2":"unstable0005",

src/GitVersionCore.Tests/Approved/VariableProviderTests.ProvidesVariablesInContinuousDeploymentModeForStable.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.3-ci.5+Branch.develop.Sha.commitSha",
2020
"BranchName":"develop",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.3-ci0005",
2324
"NuGetVersion":"1.2.3-ci0005",
2425
"NuGetPreReleaseTagV2":"ci0005",

src/GitVersionCore.Tests/Approved/VariableProviderTests.ProvidesVariablesInContinuousDeploymentModeForStableWhenCurrentCommitIsTagged.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"InformationalVersion":"1.2.3+5.Sha.commitSha",
2020
"BranchName":"",
2121
"Sha":"commitSha",
22+
"ShortSha":"commitShortSha",
2223
"NuGetVersionV2":"1.2.3",
2324
"NuGetVersion":"1.2.3",
2425
"NuGetPreReleaseTagV2":"",

src/GitVersionCore.Tests/Approved/cs/GitVersionInformationGeneratorTests.ShouldCreateFile.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ static class GitVersionInformation
3131
public static string InformationalVersion = "1.2.3-unstable.4+5.Branch.feature1.Sha.commitSha";
3232
public static string BranchName = "feature1";
3333
public static string Sha = "commitSha";
34+
public static string ShortSha = "commitShortSha";
3435
public static string NuGetVersionV2 = "1.2.3-unstable0004";
3536
public static string NuGetVersion = "1.2.3-unstable0004";
3637
public static string NuGetPreReleaseTagV2 = "unstable0004";

src/GitVersionCore.Tests/Approved/fs/GitVersionInformationGeneratorTests.ShouldCreateFile.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module GitVersionInformation
3131
let InformationalVersion = "1.2.3-unstable.4+5.Branch.feature1.Sha.commitSha"
3232
let BranchName = "feature1"
3333
let Sha = "commitSha"
34+
let ShortSha = "commitShortSha"
3435
let NuGetVersionV2 = "1.2.3-unstable0004"
3536
let NuGetVersion = "1.2.3-unstable0004"
3637
let NuGetPreReleaseTagV2 = "unstable0004"

0 commit comments

Comments
 (0)