From 45589799362b7d3d180b7a556f2ee5861cc8c485 Mon Sep 17 00:00:00 2001 From: Tim Pilius Date: Thu, 22 Aug 2024 18:35:46 -0400 Subject: [PATCH] Slight rename of a method. Adding a check to publish release to make sure a leading 'v' isn't added to the version --- BattleNetPrefill/Web/CdnRequestManager.cs | 4 ++-- _publish-release.ps1 | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BattleNetPrefill/Web/CdnRequestManager.cs b/BattleNetPrefill/Web/CdnRequestManager.cs index e4c80ed2..0bf69024 100644 --- a/BattleNetPrefill/Web/CdnRequestManager.cs +++ b/BattleNetPrefill/Web/CdnRequestManager.cs @@ -194,12 +194,12 @@ public async Task GetRequestAsBytesAsync(RootFolder rootPath, MD5Hash ha Request request = new Request(_productBasePath, rootPath, hash, startBytes, endBytes, isIndex); return await AppConfig.RetryPolicy.ExecuteAsync(async () => { - return await GetRequestAsBytesAsync(request); + return await GetRequestAsBytes_SingleRequestAsync(request); }); } //TODO not a fan of how many times forceRecache is passed down - private async Task GetRequestAsBytesAsync(Request request, bool forceRecache = false) + private async Task GetRequestAsBytes_SingleRequestAsync(Request request, bool forceRecache = false) { allRequestsMade.Add(request); diff --git a/_publish-release.ps1 b/_publish-release.ps1 index 503c505d..720a812d 100644 --- a/_publish-release.ps1 +++ b/_publish-release.ps1 @@ -9,6 +9,10 @@ Write-Color "Current version: ", $currentVersion -Color White, Yellow # Getting new version to use $newVersion = Read-Host "Enter new version, with no leading 'v'. Ex. '1.2.3'" +if($newVersion.Contains("v")) +{ + Write-Color $newVersion, " is not a valid version since it has a leading 'v'." -Color Yellow, Red +} # Updating csproj version $currentContent = Get-Content -Path .\BattleNetPrefill\BattleNetPrefill.csproj -Raw