Migrate to Reactor.MSBuild

This commit is contained in:
js6pak committed 2021-06-07 22:31:55 +02:00
1 parent a93df5194f
commit 1509a94257
11 files changed
+82 -187

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
var target = Argument("target", "Build");
var buildId = EnvironmentVariable("GITHUB_RUN_NUMBER");
var @ref = EnvironmentVariable("GITHUB_REF");
const string prefix = "refs/tags/";
var tag = !string.IsNullOrEmpty(@ref) && @ref.StartsWith(prefix) ? @ref.Substring(prefix.Length) : null;
Task("Build")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings
{
Configuration = "Release",
MSBuildSettings = new DotNetCoreMSBuildSettings()
};
if (tag != null)
{
settings.MSBuildSettings.Properties["Version"] = new[] { tag };
}
else if (buildId != null)
{
settings.VersionSuffix = "ci." + buildId;
}
foreach (var gamePlatform in new[] { "Steam", "Itch" })
{
settings.MSBuildSettings.Properties["GamePlatform"] = new[] { gamePlatform };
DotNetCoreBuild(".", settings);
}
});
RunTarget(target);