Skip to content

Commit

Permalink
Allow giving special versions to build script
Browse files Browse the repository at this point in the history
  • Loading branch information
ghorsington committed Aug 14, 2022
1 parent e473f08 commit ec79ad0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var cleanDependencyCache = Argument("clean_build_cache", false);
var lastBuildCommit = Argument("last_build_commit", "");
var nugetPushSource = Argument("nuget_push_source", "https://nuget.bepinex.dev/v3/index.json");
var nugetPushKey = Argument("nuget_push_key", "");
var customBuildVersion = Argument("build_version", "");

var buildVersion = "";
var currentCommit = RunGit("rev-parse HEAD");
Expand Down Expand Up @@ -69,6 +70,10 @@ Task("Build")
buildSettings.MSBuildSettings.Properties["AssemblyVersion"] = new[] { buildVersion + "." + buildId };
buildVersion += "-be." + buildId;
buildSettings.MSBuildSettings.Properties["Version"] = new[] { buildVersion };
} else if (!string.IsNullOrEmpty(customBuildVersion))
{
buildVersion = customBuildVersion;
buildSettings.MSBuildSettings.Properties["Version"] = new[] { buildVersion };
}

foreach (var file in GetFiles("./BepInEx.*/*.csproj"))
Expand Down

0 comments on commit ec79ad0

Please sign in to comment.