Skip to content

Commit acd1c73

Browse files
committed
Fix opts.BaseUrl null ref (App Cast Gen)
Fixes #173
1 parent d00804c commit acd1c73

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@
4444
</PropertyGroup>
4545
<PropertyGroup>
4646
<PostBuildEvent />
47-
<AssemblyVersion>2.0.0.0</AssemblyVersion>
48-
<FileVersion>2.0.0.0</FileVersion>
47+
<AssemblyVersion>2.0.1.0</AssemblyVersion>
48+
<FileVersion>2.0.1.0</FileVersion>
4949
<PackageId>NetSparkleUpdater.Tools.AppCastGenerator</PackageId>
50-
<Version>2.0.0</Version>
50+
<Version>2.0.1</Version>
5151
<Authors>Deadpikle</Authors>
5252
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
5353
<PackageProjectUrl>https://github.com/NetSparkleUpdater/NetSparkle</PackageProjectUrl>
5454
<PackageIcon>software-update-available.png</PackageIcon>
5555
<RepositoryUrl>https://github.com/NetSparkleUpdater/NetSparkle.git</RepositoryUrl>
5656
<RepositoryType>git</RepositoryType>
5757
<PackageTags>sparkle, netsparkle, update, software, updater, appcast, generate, software, app cast</PackageTags>
58-
<PackageReleaseNotes>2.0.0: See https://github.com/NetSparkleUpdater/NetSparkle for all release information and to file issues/pull requests for this project.</PackageReleaseNotes>
58+
<PackageReleaseNotes>2.0.1: See https://github.com/NetSparkleUpdater/NetSparkle for all release information and to file issues/pull requests for this project.</PackageReleaseNotes>
5959
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6060
</PropertyGroup>
6161
<ItemGroup>

src/NetSparkle.Tools.AppCastGenerator/Program.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ static void Run(Options opts)
248248
var itemTitle = string.IsNullOrWhiteSpace(productName) ? productVersion : productName + " " + productVersion;
249249

250250
var urlEncodedFileName = HttpUtility.UrlEncode(fileInfo.Name);
251-
var urlToUse = opts.BaseUrl.ToString().EndsWith("/")
252-
? opts.BaseUrl.ToString()
253-
: opts.BaseUrl + "/";
251+
var urlToUse = !string.IsNullOrWhiteSpace(opts.BaseUrl?.ToString())
252+
? (opts.BaseUrl.ToString().EndsWith("/") ? opts.BaseUrl.ToString() : opts.BaseUrl + "/")
253+
: "";
254254
if (opts.PrefixVersion)
255255
{
256256
urlToUse += $"{version}/";

0 commit comments

Comments
 (0)