Skip to content

Add VersionSourceSha to output #1618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/more-info/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ For the `release/3.0.0` branch of GitVersion it shows:
"NuGetVersion":"3.0.0-beta0001",
"NuGetPreReleaseTagV2":"beta0001",
"NuGetPreReleaseTag":"beta0001",
"VersionSourceSha":"950d2f830f5a2af12a6779a48d20dcbb02351f25",
"CommitsSinceVersionSource":1,
"CommitsSinceVersionSourcePadded":"0001",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.0-unstable0004",
"NuGetPreReleaseTagV2":"unstable0004",
"NuGetPreReleaseTag":"unstable0004",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.3-unstable0004",
"NuGetPreReleaseTagV2":"unstable0004",
"NuGetPreReleaseTag":"unstable0004",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.3-unstable00004",
"NuGetPreReleaseTagV2":"unstable0004",
"NuGetPreReleaseTag":"unstable0004",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.3",
"NuGetPreReleaseTagV2":"",
"NuGetPreReleaseTag":"",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.3-unstable0005",
"NuGetPreReleaseTagV2":"unstable0005",
"NuGetPreReleaseTag":"unstable0005",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.3-ci0005",
"NuGetPreReleaseTagV2":"ci0005",
"NuGetPreReleaseTag":"ci0005",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"NuGetVersion":"1.2.3",
"NuGetPreReleaseTagV2":"",
"NuGetPreReleaseTag":"",
"VersionSourceSha":"versionSourceSha",
"CommitsSinceVersionSource":5,
"CommitsSinceVersionSourcePadded":"0005",
"CommitDate":"2014-03-06"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
<?define SemVer="1.2.3"?>
<?define Sha="commitSha"?>
<?define ShortSha="commitShortSha"?>
<?define VersionSourceSha="versionSourceSha"?>
<?define WeightedPreReleaseNumber=""?>
</Include>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static class GitVersionInformation
public static string NuGetVersion = "1.2.3-unstable0004";
public static string NuGetPreReleaseTagV2 = "unstable0004";
public static string NuGetPreReleaseTag = "unstable0004";
public static string VersionSourceSha = "versionSourceSha";
public static string CommitsSinceVersionSource = "5";
public static string CommitsSinceVersionSourcePadded = "0005";
public static string CommitDate = "2014-03-06";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module GitVersionInformation
let NuGetVersion = "1.2.3-unstable0004"
let NuGetPreReleaseTagV2 = "unstable0004"
let NuGetPreReleaseTag = "unstable0004"
let VersionSourceSha = "versionSourceSha"
let CommitsSinceVersionSource = "5"
let CommitsSinceVersionSourcePadded = "0005"
let CommitDate = "2014-03-06"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ NotInheritable Class GitVersionInformation
Public Shared NuGetVersion As String = "1.2.3-unstable0004"
Public Shared NuGetPreReleaseTagV2 As String = "unstable0004"
Public Shared NuGetPreReleaseTag As String = "unstable0004"
Public Shared VersionSourceSha As String = "versionSourceSha"
Public Shared CommitsSinceVersionSource As String = "5"
Public Shared CommitsSinceVersionSourcePadded As String = "0005"
Public Shared CommitDate As String = "2014-03-06"
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/AssemblyInfoFileUpdaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ private static void VerifyAssemblyInfoFile(
var fileSystem = Substitute.For<IFileSystem>();
var version = new SemanticVersion
{
BuildMetaData = new SemanticVersionBuildMetaData(3, "foo", "hash", "shortHash", DateTimeOffset.Now),
BuildMetaData = new SemanticVersionBuildMetaData("versionSourceHash", 3, "foo", "hash", "shortHash", DateTimeOffset.Now),
Major = 2,
Minor = 3,
Patch = 1
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/CommitDateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void CommitDateFormatTest(string format, string expectedOutcome)
var formatValues = new SemanticVersionFormatValues(
new SemanticVersion
{
BuildMetaData = new SemanticVersionBuildMetaData(0, "master", "3139d4eeb044f46057693473eacc2655b3b27e7d", "3139d4eeb", new DateTimeOffset(date, TimeSpan.Zero)), // assume time zone is UTC
BuildMetaData = new SemanticVersionBuildMetaData("950d2f830f5a2af12a6779a48d20dcbb02351f25", 0, "master", "3139d4eeb044f46057693473eacc2655b3b27e7d", "3139d4eeb", new DateTimeOffset(date, TimeSpan.Zero)), // assume time zone is UTC

},
new EffectiveConfiguration(
Expand Down
21 changes: 12 additions & 9 deletions src/GitVersionCore.Tests/ExecuteCoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void CacheKeySameAfterReNormalizing()
var cacheKey2 = GitVersionCacheKeyFactory.Create(fileSystem, gitPreparer, null);

cacheKey2.Value.ShouldBe(cacheKey1.Value);
});
});
}

[Test]
Expand All @@ -51,8 +51,8 @@ public void CacheFileExistsOnDisk()
PreReleaseLabel: test
PreReleaseNumber: 19
WeightedPreReleaseNumber: 19
BuildMetaData:
BuildMetaDataPadded:
BuildMetaData:
BuildMetaDataPadded:
FullBuildMetaData: Branch.feature/test.Sha.dd2a29aff0c948e1bdf3dabbe13e1576e70d5f9f
MajorMinorPatch: 4.10.3
SemVer: 4.10.3-test.19
Expand All @@ -69,6 +69,7 @@ public void CacheFileExistsOnDisk()
NuGetVersion: 4.10.3-test0019
NuGetPreReleaseTagV2: test0019
NuGetPreReleaseTag: test0019
VersionSourceSha: 4.10.2
CommitsSinceVersionSource: 19
CommitsSinceVersionSourcePadded: 0019
CommitDate: 2015-11-10
Expand Down Expand Up @@ -98,8 +99,8 @@ public void CacheFileExistsOnDiskWhenOverrideConfigIsSpecifiedVersionShouldBeDyn
PreReleaseTagWithDash: -test.19
PreReleaseLabel: test
PreReleaseNumber: 19
BuildMetaData:
BuildMetaDataPadded:
BuildMetaData:
BuildMetaDataPadded:
FullBuildMetaData: Branch.feature/test.Sha.dd2a29aff0c948e1bdf3dabbe13e1576e70d5f9f
MajorMinorPatch: 4.10.3
SemVer: 4.10.3-test.19
Expand Down Expand Up @@ -163,8 +164,8 @@ public void ConfigChangeInvalidatesCache()
PreReleaseLabel: test
PreReleaseNumber: 19
WeightedPreReleaseNumber: 19
BuildMetaData:
BuildMetaDataPadded:
BuildMetaData:
BuildMetaDataPadded:
FullBuildMetaData: Branch.feature/test.Sha.dd2a29aff0c948e1bdf3dabbe13e1576e70d5f9f
MajorMinorPatch: 4.10.3
SemVer: 4.10.3-test.19
Expand All @@ -181,6 +182,7 @@ public void ConfigChangeInvalidatesCache()
NuGetVersion: 4.10.3-test0019
NuGetPreReleaseTagV2: test0019
NuGetPreReleaseTag: test0019
VersionSourceSha: 4.10.2
CommitsSinceVersionSource: 19
CommitsSinceVersionSourcePadded: 0019
CommitDate: 2015-11-10
Expand Down Expand Up @@ -214,8 +216,8 @@ public void NoCacheBypassesCache()
PreReleaseLabel: test
PreReleaseNumber: 19
WeightedPreReleaseNumber: 19
BuildMetaData:
BuildMetaDataPadded:
BuildMetaData:
BuildMetaDataPadded:
FullBuildMetaData: Branch.feature/test.Sha.dd2a29aff0c948e1bdf3dabbe13e1576e70d5f9f
MajorMinorPatch: 4.10.3
SemVer: 4.10.3-test.19
Expand All @@ -232,6 +234,7 @@ public void NoCacheBypassesCache()
NuGetVersion: 4.10.3-test0019
NuGetPreReleaseTagV2: test0019
NuGetPreReleaseTag: test0019
VersionSourceSha: 4.10.2
CommitsSinceVersionSource: 19
CommitsSinceVersionSourcePadded: 0019
CommitDate: 2015-11-10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void ShouldCreateFile(string fileExtension)
Minor = 2,
Patch = 3,
PreReleaseTag = "unstable4",
BuildMetaData = new SemanticVersionBuildMetaData(5,
BuildMetaData = new SemanticVersionBuildMetaData("versionSourceSha", 5,
"feature1", "commitSha", "commitShortSha", DateTimeOffset.Parse("2014-03-06 23:59:59Z"))
};

Expand Down
28 changes: 14 additions & 14 deletions src/GitVersionCore.Tests/InformationalVersionBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
[TestFixture]
public class InformationalVersionBuilderTests : TestBase
{
[TestCase("feature1", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "unstable", 1, "1.2.3-unstable+1.Branch.feature1.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("develop", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "alpha645", null, "1.2.3-alpha.645+Branch.develop.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("develop", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "unstable645", null, "1.2.3-unstable.645+Branch.develop.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("develop", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "beta645", null, "1.2.3-beta.645+Branch.develop.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("hotfix-foo", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "alpha645", null, "1.2.3-alpha.645+Branch.hotfix-foo.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("hotfix-foo", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "beta645", null, "1.2.3-beta.645+Branch.hotfix-foo.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("hotfix-foo", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, null, null, "1.2.3+Branch.hotfix-foo.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("master", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, null, null, "1.2.3+Branch.master.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("myPullRequest", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "unstable3", null, "1.2.3-unstable.3+Branch.myPullRequest.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("release-1.2", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 0, "beta2", null, "1.2.0-beta.2+Branch.release-1.2.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("release-1.2", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 0, "alpha2", null, "1.2.0-alpha.2+Branch.release-1.2.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("feature1", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "unstable", "1c6609bcf", 1, "1.2.3-unstable+1.Branch.feature1.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("develop", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "alpha645", null, null, "1.2.3-alpha.645+Branch.develop.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("develop", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "unstable645", null, null, "1.2.3-unstable.645+Branch.develop.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("develop", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "beta645", null, null, "1.2.3-beta.645+Branch.develop.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("hotfix-foo", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "alpha645", null, null, "1.2.3-alpha.645+Branch.hotfix-foo.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("hotfix-foo", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "beta645", null, null, "1.2.3-beta.645+Branch.hotfix-foo.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("hotfix-foo", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, null, null, null, "1.2.3+Branch.hotfix-foo.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("master", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, null, null, null, "1.2.3+Branch.master.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("myPullRequest", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 3, "unstable3", null, null, "1.2.3-unstable.3+Branch.myPullRequest.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("release-1.2", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 0, "beta2", null, null, "1.2.0-beta.2+Branch.release-1.2.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("release-1.2", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 0, "alpha2", null, null, "1.2.0-alpha.2+Branch.release-1.2.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
public void ValidateInformationalVersionBuilder(string branchName, string sha, string shortSha, int major, int minor, int patch,
string tag, int? suffix, string versionString)
string tag, string versionSourceSha, int? commitsSinceTag, string versionString)
{
var semanticVersion = new SemanticVersion
{
Major = major,
Minor = minor,
Patch = patch,
PreReleaseTag = tag,
BuildMetaData = new SemanticVersionBuildMetaData(suffix, branchName, sha, shortSha, DateTimeOffset.MinValue),
BuildMetaData = new SemanticVersionBuildMetaData(versionSourceSha, commitsSinceTag, branchName, sha, shortSha, DateTimeOffset.MinValue),
};
var informationalVersion = semanticVersion.ToString("i");

Assert.AreEqual(versionString, informationalVersion);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ public void CommitOnDevelop_AfterReleaseBranchMergeToDevelop_ShouldNotResetCount

// Make new commit on develop
fixture.Checkout("develop");
// Checkout to release (no new commits)
// Checkout to release (no new commits)
fixture.Checkout("release-2.0.0");
fixture.AssertFullSemver(config, "2.0.0-beta.3");
fixture.Checkout("develop");
fixture.Repository.MakeACommit("develop after merge");

// Checkout to release (no new commits)
// Checkout to release (no new commits)
fixture.Checkout("release-2.0.0");
fixture.AssertFullSemver(config, "2.0.0-beta.3");

Expand All @@ -413,7 +413,7 @@ public void CommitOnDevelop_AfterReleaseBranchMergeToDevelop_ShouldNotResetCount
fixture.Checkout("develop");
fixture.Repository.MergeNoFF("release-2.0.0", Generate.SignatureNow());

// Checkout to release (no new commits)
// Checkout to release (no new commits)
fixture.Checkout("release-2.0.0");
fixture.AssertFullSemver(config, "2.0.0-beta.5");
}
Expand Down Expand Up @@ -538,7 +538,7 @@ public void FeatureFromReleaseBranch_ShouldNotResetCount()
Commands.Checkout(fixture.Repository, "feature/xxx");
fixture.Repository.MakeACommit("feature 3");

// Checkout to release (no new commits)
// Checkout to release (no new commits)
Commands.Checkout(fixture.Repository, "release-2.0.0");
fixture.AssertFullSemver(config, "2.0.0-beta.11");

Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore.Tests/JsonVersionBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void Json()
Minor = 2,
Patch = 0,
PreReleaseTag = "unstable4",
BuildMetaData = new SemanticVersionBuildMetaData(5, "feature1", "commitSha", "commitShortSha", DateTimeOffset.Parse("2014-03-06 23:59:59Z"))
BuildMetaData = new SemanticVersionBuildMetaData("versionSourceSha", 5, "feature1", "commitSha", "commitShortSha", DateTimeOffset.Parse("2014-03-06 23:59:59Z"))
};

var config = new TestEffectiveConfiguration();
Expand Down
6 changes: 3 additions & 3 deletions src/GitVersionCore.Tests/TestableVersionVariables.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GitVersionCore.Tests
namespace GitVersionCore.Tests
{
using GitVersion;

Expand All @@ -13,13 +13,13 @@ public TestableVersionVariables(
string preReleaseTagWithDash = "", string preReleaseLabel = "", string preReleaseNumber = "",
string weightedPreReleaseNumber = "", string informationalVersion = "", string commitDate = "",
string nugetVersion = "", string nugetVersionV2 = "", string nugetPreReleaseTag = "",
string nugetPreReleaseTagV2 = "", string commitsSinceVersionSource = "",
string nugetPreReleaseTagV2 = "", string versionSourceSha = "", string commitsSinceVersionSource = "",
string commitsSinceVersionSourcePadded = "") : base(
major, minor, patch, buildMetaData, buildMetaDataPadded, fullBuildMetaData, branchName,
sha, shortSha, majorMinorPatch, semVer, legacySemVer, legacySemVerPadded, fullSemVer,
assemblySemVer, assemblySemFileVer, preReleaseTag, weightedPreReleaseNumber, preReleaseTagWithDash,
preReleaseLabel, preReleaseNumber, informationalVersion, commitDate, nugetVersion, nugetVersionV2,
nugetPreReleaseTag, nugetPreReleaseTagV2, commitsSinceVersionSource, commitsSinceVersionSourcePadded)
nugetPreReleaseTag, nugetPreReleaseTagV2, versionSourceSha, commitsSinceVersionSource, commitsSinceVersionSourcePadded)
{
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/GitVersionCore.Tests/VariableProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[TestFixture]
public class VariableProviderTests : TestBase
{
{

[SetUp]
public void Setup()
Expand All @@ -28,6 +28,7 @@ public void ProvidesVariablesInContinuousDeliveryModeForPreRelease()
BuildMetaData = "5.Branch.develop"
};

semVer.BuildMetaData.VersionSourceSha = "versionSourceSha";
semVer.BuildMetaData.Sha = "commitSha";
semVer.BuildMetaData.ShortSha = "commitShortSha";
semVer.BuildMetaData.CommitDate = DateTimeOffset.Parse("2014-03-06 23:59:59Z");
Expand All @@ -54,6 +55,7 @@ public void ProvidesVariablesInContinuousDeliveryModeForPreReleaseWithPadding()
BuildMetaData = "5.Branch.develop"
};

semVer.BuildMetaData.VersionSourceSha = "versionSourceSha";
semVer.BuildMetaData.Sha = "commitSha";
semVer.BuildMetaData.ShortSha = "commitShortSha";
semVer.BuildMetaData.CommitDate = DateTimeOffset.Parse("2014-03-06 23:59:59Z");
Expand All @@ -80,6 +82,7 @@ public void ProvidesVariablesInContinuousDeploymentModeForPreRelease()
BuildMetaData = "5.Branch.develop"
};

semVer.BuildMetaData.VersionSourceSha = "versionSourceSha";
semVer.BuildMetaData.Sha = "commitSha";
semVer.BuildMetaData.ShortSha = "commitShortSha";
semVer.BuildMetaData.CommitDate = DateTimeOffset.Parse("2014-03-06 23:59:59Z");
Expand All @@ -104,6 +107,7 @@ public void ProvidesVariablesInContinuousDeliveryModeForStable()
BuildMetaData = "5.Branch.develop"
};

semVer.BuildMetaData.VersionSourceSha = "versionSourceSha";
semVer.BuildMetaData.Sha = "commitSha";
semVer.BuildMetaData.ShortSha = "commitShortSha";
semVer.BuildMetaData.CommitDate = DateTimeOffset.Parse("2014-03-06 23:59:59Z");
Expand All @@ -128,6 +132,7 @@ public void ProvidesVariablesInContinuousDeploymentModeForStable()
BuildMetaData = "5.Branch.develop"
};

semVer.BuildMetaData.VersionSourceSha = "versionSourceSha";
semVer.BuildMetaData.Sha = "commitSha";
semVer.BuildMetaData.ShortSha = "commitShortSha";
semVer.BuildMetaData.CommitDate = DateTimeOffset.Parse("2014-03-06 23:59:59Z");
Expand All @@ -151,6 +156,7 @@ public void ProvidesVariablesInContinuousDeploymentModeForStableWhenCurrentCommi
Patch = 3,
BuildMetaData =
{
VersionSourceSha = "versionSourceSha",
CommitsSinceTag = 5,
CommitsSinceVersionSource = 5,
Sha = "commitSha",
Expand Down Expand Up @@ -210,4 +216,4 @@ public void ProvidesVariablesInContinuousDeploymentModeWithTagSetToUseBranchName

vars.FullSemVer.ShouldBe("1.2.3-feature.5");
}
}
}
Loading