pull/1510/head
Jamie.Rees 7 years ago
parent 2002ea9d6f
commit 9a3e324265

@ -4,7 +4,7 @@ os: Visual Studio 2015
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
version: '{version}-$(APPVEYOR_REPO_BRANCH)'
package_version: '{version}'
environment:

@ -2,9 +2,6 @@
{
public class ApplicationSettings
{
public string Branch { get; set; }
public string Version { get; set; }
public string OmbiService { get; set; }
public string FriendlyVersion { get; set; }
}
}

@ -0,0 +1,15 @@
using System;
using System.Reflection;
namespace Ombi.Helpers
{
public static class AssemblyHelper
{
public static string GetRuntimeVersion() =>
Assembly.GetEntryAssembly().GetType()
.GetTypeInfo()
.Assembly
.GetCustomAttribute<AssemblyProductAttribute>()
.Product;
}
}

@ -35,7 +35,8 @@ namespace Ombi.Schedule.Ombi
// IF AutoUpdateEnabled =>
// ELSE Return;
var currentLocation = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
var currentBranch = Settings.Branch;
//var currentBranch = Settings.Branch;
var currentBranch = "BRANCH";
#if DEBUG
if (currentBranch == "{{BRANCH}}")
@ -45,7 +46,7 @@ namespace Ombi.Schedule.Ombi
#endif
var updates = await OmbiService.GetUpdates(currentBranch);
var serverVersion = updates.UpdateVersionString.Substring(1, 6);
if (serverVersion != Settings.FriendlyVersion)
if (serverVersion != AssemblyHelper.GetRuntimeVersion())
{
// Let's download the correct zip

Loading…
Cancel
Save