1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 14:10:40 +08:00

Add support for updating AppVeyor version

This commit is contained in:
Dean Herbert
2018-04-20 19:17:11 +09:00
Unverified
parent 19e270062f
commit 1cad6f7a8e
2 changed files with 23 additions and 1 deletions
+21
View File
@@ -7,6 +7,7 @@ using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Management.Automation;
using Newtonsoft.Json;
using osu.Framework.IO.Network;
using FileWebRequest = osu.Framework.IO.Network.FileWebRequest;
@@ -99,6 +100,7 @@ namespace osu.Desktop.Deploy
write("Updating AssemblyInfo...");
updateCsprojVersion(version);
updateAppveyorVersion(version);
write("Running build process...");
foreach (string targetName in TargetNames.Split(','))
@@ -404,6 +406,25 @@ namespace osu.Desktop.Deploy
Console.WriteLine();
}
private static bool updateAppveyorVersion(string version)
{
try
{
using (PowerShell ps = PowerShell.Create())
{
ps.AddScript($"Update-AppveyorBuild -Version \"{version}\"");
ps.Invoke();
}
return true;
}
catch
{
// we don't have appveyor and don't care
}
return false;
}
private static void write(string message, ConsoleColor col = ConsoleColor.Gray)
{
if (sw.ElapsedMilliseconds > 0)