Check if version exists

This commit is contained in:
theolivenbaum
2022-04-21 09:38:41 +02:00
parent d910eec8df
commit 4d5d6722a7
2 changed files with 10 additions and 1 deletions

View File

@@ -9,6 +9,16 @@ if (!Version.TryParse(version, out _))
return 0xDEAD;
}
using var client = new HttpClient();
var response = await client.GetAsync($"https://github.com/electron/electron/releases/tag/v{version}");
if (!response.IsSuccessStatusCode)
{
Console.WriteLine($"Version not found on GitHub : {version}");
return 0xDEAD;
}
var yamlFile = Path.GetFullPath("../.devops/build-nuget.yaml");
var csFile = Path.GetFullPath("../ElectronNET.CLI/Commands/BuildCommand.cs");
var packageFile = Path.GetFullPath("../ElectronNET.Host/package.json");

View File

@@ -4,7 +4,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>