Skip to content

Commit c52e76f

Browse files
authored
Remove UTC prefix in infoVersion (bchavez#506)
* Make build time AssemblyInfo.Metadata parsable. * without AssemblyInfo.Metadata for .NET40
1 parent 6a5ac7e commit c52e76f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Builder/Utils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static void MakeBuildInfo(Project project, BuildTimeInfo bti)
7272
var path = Folders.Source / project.Name / "Properties" / "AssemblyInfo.cs";
7373
var fullVersion = bti.FullVersion;
7474
var version = BuildContext.GetVersionWithoutPreReleeaseName(fullVersion);
75-
var infoVersion = $"{fullVersion} built on {buildTimeUtc} UTC";
75+
var infoVersion = $"{fullVersion} built on {buildTimeUtc:u}";
7676
var copyright = $"Brian Chavez © {buildTimeUtc.Year}";
7777
var title = project.GetProperty("NukeProjectTitle");
7878
var attrs = new List<AssemblyInfo.Attribute>
@@ -85,6 +85,7 @@ public static void MakeBuildInfo(Project project, BuildTimeInfo bti)
8585
AssemblyInfo.FileVersion(version),
8686
AssemblyInfo.InformationalVersion(infoVersion),
8787
AssemblyInfo.Trademark("MIT License"),
88+
//AssemblyInfo.Metadata("BuildTime", $"{bti.BuildTimeUtc:u}")
8889
//AssemblyInfo.Metadata("CommitHash", )
8990
};
9091
attrs.AddRange(bti.ExtraAttributes);

0 commit comments

Comments
 (0)