diff --git a/BepInEx.Shared/AssemblyInfo.cs b/BepInEx.Shared/AssemblyInfo.cs index c067810..7cbdea2 100644 --- a/BepInEx.Shared/AssemblyInfo.cs +++ b/BepInEx.Shared/AssemblyInfo.cs @@ -5,9 +5,4 @@ using BepInEx.Shared; [assembly: AssemblyCopyright("Copyright © 2020 BepInEx Team")] [assembly: AssemblyVersion(VersionInfo.VERSION)] [assembly: AssemblyFileVersion(VersionInfo.VERSION)] -[assembly: AssemblyInformationalVersion(VersionInfo.VERSION)] - -internal static class VersionInfo -{ - public const string VERSION = "6.0.0.0"; -} \ No newline at end of file +[assembly: AssemblyInformationalVersion(VersionInfo.VERSION)] \ No newline at end of file diff --git a/BepInEx.Shared/BepInEx.Shared.projitems b/BepInEx.Shared/BepInEx.Shared.projitems index 6a442d4..586e81f 100644 --- a/BepInEx.Shared/BepInEx.Shared.projitems +++ b/BepInEx.Shared/BepInEx.Shared.projitems @@ -11,5 +11,6 @@ + \ No newline at end of file diff --git a/BepInEx.Shared/VersionInfo.cs b/BepInEx.Shared/VersionInfo.cs new file mode 100644 index 0000000..00b62fe --- /dev/null +++ b/BepInEx.Shared/VersionInfo.cs @@ -0,0 +1,7 @@ +namespace BepInEx.Shared +{ + internal static class VersionInfo + { + public const string VERSION = "6.0.0.0"; + } +} \ No newline at end of file diff --git a/build.cake b/build.cake index 5b6dbbe..0fd3094 100644 --- a/build.cake +++ b/build.cake @@ -51,12 +51,13 @@ Task("Build") .IsDependentOn("PullDependencies") .Does(() => { - var bepinExProperties = Directory("./BepInEx.Core/Properties"); + var bepinExProperties = Directory("./BepInEx.Shared"); if(isBleedingEdge) { + CopyFile(bepinExProperties + File("VersionInfo.cs"), bepinExProperties + File("VersionInfo.cs.bak")); CopyFile(bepinExProperties + File("AssemblyInfo.cs"), bepinExProperties + File("AssemblyInfo.cs.bak")); - ReplaceRegexInFiles(bepinExProperties + File("AssemblyInfo.cs"), "([0-9]+\\.[0-9]+\\.[0-9]+\\.)[0-9]+", "${1}" + buildId); + ReplaceRegexInFiles(bepinExProperties + File("VersionInfo.cs"), "([0-9]+\\.[0-9]+\\.[0-9]+\\.)[0-9]+", "${1}" + buildId); FileAppendText(bepinExProperties + File("AssemblyInfo.cs"), TransformText("\n[assembly: BuildInfo(\"BLEEDING EDGE Build #<%buildNumber%> from <%shortCommit%> at <%branchName%>\")]\n") @@ -66,7 +67,7 @@ Task("Build") .ToString()); } - buildVersion = FindRegexMatchInFile(bepinExProperties + File("AssemblyInfo.cs"), "[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+", System.Text.RegularExpressions.RegexOptions.None); + buildVersion = FindRegexMatchInFile(bepinExProperties + File("VersionInfo.cs"), "[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+", System.Text.RegularExpressions.RegexOptions.None); var buildSettings = new MSBuildSettings { Configuration = "Release", @@ -84,11 +85,13 @@ Task("Build") }) .Finally(() => { - var bepinExProperties = Directory("./BepInEx.Core/Properties"); + var bepinExProperties = Directory("./BepInEx.Shared"); if(isBleedingEdge) { DeleteFile(bepinExProperties + File("AssemblyInfo.cs")); + DeleteFile(bepinExProperties + File("VersionInfo.cs")); MoveFile(bepinExProperties + File("AssemblyInfo.cs.bak"), bepinExProperties + File("AssemblyInfo.cs")); + MoveFile(bepinExProperties + File("VersionInfo.cs.bak"), bepinExProperties + File("VersionInfo.cs")); } });