Skip to content

Commit 17c300b

Browse files
authored
Merge pull request bdovaz#211 from bdovaz/feature/bump-CurrentRegistryVersion
Bump CurrentRegistryVersion
2 parents 813b2b0 + 87b7fd4 commit 17c300b

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/UnityNuGet.Server/RegistryCacheInitializer.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ public Task StartAsync(CancellationToken cancellationToken)
4040
var urls = configuration[WebHostDefaults.ServerUrlsKey];
4141

4242
// Select HTTPS in production, HTTP in development
43-
var url = urls?.Split(';').FirstOrDefault(x => !x.StartsWith("https"));
44-
if (url == null)
45-
{
46-
throw new InvalidOperationException($"Unable to find a proper server URL from `{urls}`. Expecting a `http://...` URL in development");
47-
}
43+
var url = (urls?.Split(';').FirstOrDefault(x => !x.StartsWith("https"))) ?? throw new InvalidOperationException($"Unable to find a proper server URL from `{urls}`. Expecting a `http://...` URL in development");
4844

4945
// https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_running_in_container-and-dotnet_running_in_containers
5046
bool runningInContainer = configuration.GetValue<bool>("DOTNET_RUNNING_IN_CONTAINER");

src/UnityNuGet/RegistryCache.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ namespace UnityNuGet
3030
/// </summary>
3131
public class RegistryCache
3232
{
33-
public static bool IsRunningOnAzure = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME"));
33+
public static readonly bool IsRunningOnAzure = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME"));
3434

3535
// Change this version number if the content of the packages are changed by an update of this class
36-
private const string CurrentRegistryVersion = "1.4.0";
36+
private const string CurrentRegistryVersion = "1.5.0";
3737

3838
private static readonly Encoding Utf8EncodingNoBom = new UTF8Encoding(false, false);
3939
private readonly string _rootPersistentFolder;

0 commit comments

Comments
 (0)