Skip to content

Commit

Permalink
Fix NetStandard1.0 dll semver number
Browse files Browse the repository at this point in the history
Temporary workround for issue App-vNext#176
  • Loading branch information
dreisenberger committed Nov 11, 2016
1 parent a5d4baf commit d94d66f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion GitVersionConfig.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
next-version: 5.0.0
next-version: 5.0.2
14 changes: 14 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var configuration = Argument<string>("configuration", "Release");
// EXTERNAL NUGET LIBRARIES
//////////////////////////////////////////////////////////////////////

#addin "Cake.FileHelpers"
#addin "System.Text.Json"
using System.Text.Json;

Expand Down Expand Up @@ -135,6 +136,18 @@ Task("__UpdateAssemblyVersionInformation")
Information("AssemblyInformationalVersion -> {0}", gitVersionOutput["InformationalVersion"]);
});

Task("__UpdateDotNetStandardAssemblyVersionNumber")
.Does(() =>
{
var assemblySemVer = gitVersionOutput["AssemblySemVer"].ToString();
Information("Updating NetStandard10 AssemblyVersion to {0}", assemblySemVer);
var replacedFiles = ReplaceRegexInFiles("./src/Polly.NetStandard10/Properties/AssemblyInfo.cs", "AssemblyVersion[(]\".*\"[)]", "AssemblyVersion(\"" + assemblySemVer +"\")");
if (!replacedFiles.Any())
{
Information("NetStandard10 AssemblyVersion could not be updated.");
}
});

Task("__UpdateAppVeyorBuildNumber")
.WithCriteria(() => AppVeyor.IsRunningOnAppVeyor)
.Does(() =>
Expand Down Expand Up @@ -299,6 +312,7 @@ Task("Build")
.IsDependentOn("__Clean")
.IsDependentOn("__RestoreNugetPackages")
.IsDependentOn("__UpdateAssemblyVersionInformation")
.IsDependentOn("__UpdateDotNetStandardAssemblyVersionNumber")
.IsDependentOn("__UpdateAppVeyorBuildNumber")
.IsDependentOn("__BuildSolutions")
.IsDependentOn("__RunTests")
Expand Down
5 changes: 3 additions & 2 deletions src/Polly.NetStandard10/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
using System.Reflection;
[assembly: AssemblyTitle("Polly")]
using System.Reflection;
[assembly: AssemblyTitle("Polly")]
[assembly: AssemblyVersion("5.0.2.0")]

0 comments on commit d94d66f

Please sign in to comment.