mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Prepping for git flow, changed update branch to master
This commit is contained in:
parent
649f666a3a
commit
2e108620d6
@ -14,7 +14,7 @@ public void should_get_list_of_available_updates()
|
||||
{
|
||||
UseRealHttp();
|
||||
|
||||
Mocker.GetMock<IConfigFileProvider>().SetupGet(c => c.UpdateUrl).Returns("http://update.nzbdrone.com/_release/");
|
||||
Mocker.GetMock<IConfigFileProvider>().SetupGet(c => c.Branch).Returns("master");
|
||||
|
||||
var updates = Subject.GetAvailablePackages().ToList();
|
||||
|
||||
|
@ -22,7 +22,7 @@ public interface IConfigFileProvider
|
||||
string Username { get; }
|
||||
string Password { get; }
|
||||
string LogLevel { get; }
|
||||
string UpdateUrl { get; }
|
||||
string Branch { get; }
|
||||
}
|
||||
|
||||
public class ConfigFileProvider : IConfigFileProvider
|
||||
@ -96,9 +96,9 @@ public bool AuthenticationEnabled
|
||||
get { return GetValueBoolean("AuthenticationEnabled", false); }
|
||||
}
|
||||
|
||||
public string UpdateUrl
|
||||
public string Branch
|
||||
{
|
||||
get { return GetValue("UpdateUrl", "http://update.nzbdrone.com/vnext/"); }
|
||||
get { return GetValue("Branch", "master"); }
|
||||
}
|
||||
|
||||
public string Username
|
||||
|
@ -71,7 +71,6 @@ private void InstallUpdate(UpdatePackage updatePackage)
|
||||
_diskProvider.MoveFolder(_appFolderInfo.GetUpdateClientFolder(),
|
||||
updateSandboxFolder);
|
||||
|
||||
|
||||
_logger.Info("Starting update client");
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using NLog;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
using NzbDrone.Core.Configuration;
|
||||
|
||||
namespace NzbDrone.Core.Update
|
||||
@ -20,7 +21,8 @@ public class UpdatePackageProvider : IUpdatePackageProvider
|
||||
private readonly IHttpProvider _httpProvider;
|
||||
private readonly Logger _logger;
|
||||
|
||||
private static readonly Regex ParseRegex = new Regex(@"(?:\>)(?<filename>NzbDrone.+?(?<version>\d+\.\d+\.\d+\.\d+).+?)(?:\<\/A\>)", RegexOptions.IgnoreCase);
|
||||
private static readonly Regex ParseRegex = new Regex(@"(?:\>)(?<filename>NzbDrone.+?(?<version>(?<=\.)\d+\.\d+\.\d+\.\d+).+?)(?:\<\/a\>)",
|
||||
RegexOptions.IgnoreCase);
|
||||
|
||||
public UpdatePackageProvider(IConfigFileProvider configService, IHttpProvider httpProvider, Logger logger)
|
||||
{
|
||||
@ -32,7 +34,10 @@ public UpdatePackageProvider(IConfigFileProvider configService, IHttpProvider ht
|
||||
public IEnumerable<UpdatePackage> GetAvailablePackages()
|
||||
{
|
||||
var updateList = new List<UpdatePackage>();
|
||||
var updateUrl = _configService.UpdateUrl;
|
||||
|
||||
var branch = _configService.Branch;
|
||||
var version = BuildInfo.Version;
|
||||
var updateUrl = String.Format("http://update.nzbdrone.com/v{0}/{1}/", version.Major, branch);
|
||||
|
||||
_logger.Debug("Getting a list of updates from {0}", updateUrl);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user