From 19e270062f464b2735f1bd59f7688e85bee99507 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 20 Apr 2018 19:12:47 +0900 Subject: [PATCH 1/2] Only build on correct branch --- appveyor.yml | 1 - appveyor_deploy.yml | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4c4b70827f..bf90cfd200 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,3 @@ -# 2017-09-14 clone_depth: 1 version: '{branch}-{build}' image: Visual Studio 2017 diff --git a/appveyor_deploy.yml b/appveyor_deploy.yml index cd241eb88f..422aaa55b6 100644 --- a/appveyor_deploy.yml +++ b/appveyor_deploy.yml @@ -1,4 +1,8 @@ -# 2017-09-14 +branches: + only: + - release +skip_tags: true +skip_branch_with_pr: true clone_depth: 1 version: '{branch}-{build}' image: Visual Studio 2017 From 1cad6f7a8ec1149da16277e02ea96c837a558c19 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 20 Apr 2018 19:17:11 +0900 Subject: [PATCH 2/2] Add support for updating AppVeyor version --- osu.Desktop.Deploy/Program.cs | 21 ++++++++++++++++++++ osu.Desktop.Deploy/osu.Desktop.Deploy.csproj | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/osu.Desktop.Deploy/Program.cs b/osu.Desktop.Deploy/Program.cs index 8c460f03cf..16bbf90cd4 100644 --- a/osu.Desktop.Deploy/Program.cs +++ b/osu.Desktop.Deploy/Program.cs @@ -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) diff --git a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj index 6b7509a381..96dcf2a0d0 100644 --- a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj +++ b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj @@ -1,4 +1,4 @@ - + net461 @@ -14,5 +14,6 @@ + \ No newline at end of file