MattEqualsCoder.GitHubReleaseChecker
1.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MattEqualsCoder.GitHubReleaseChecker --version 1.1.0
NuGet\Install-Package MattEqualsCoder.GitHubReleaseChecker -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MattEqualsCoder.GitHubReleaseChecker" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MattEqualsCoder.GitHubReleaseChecker --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MattEqualsCoder.GitHubReleaseChecker, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MattEqualsCoder.GitHubReleaseChecker as a Cake Addin #addin nuget:?package=MattEqualsCoder.GitHubReleaseChecker&version=1.1.0 // Install MattEqualsCoder.GitHubReleaseChecker as a Cake Tool #tool nuget:?package=MattEqualsCoder.GitHubReleaseChecker&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GitHub Release Checker
Small Nuget package for getting the finding the latest release on GitHub and comparing a provided version with.
- Version checking is based on Semantic Versioning
- It should also work with flexible dot number notations (e.g., 1.2.3.1 will record as newer than 1.2.3 as well as 1.2.3.0)
- GitHub tags need to match the version (v is removed from the beginning)
- Only the most recent 10 releases are checked
- Built to be used with Dependency Injection
- It should be compatible with the .net build versioning that includes the git commit
- Note that if the GitHub tags don't include the git commit in them, then it will treat 1.2.3+hash1 as equal to 1.2.3+hash2
Examples
Adding the services to a project
Host.CreateDefaultBuilder(e.Args)
.ConfigureLogging(...)
.ConfigureServices(services =>
{
services.AddGitHubReleaseCheckerServices();
})
.Start();
Checking the release
var version = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
var newerGitHubRelease = _host.Services.GetRequiredService<IGitHubReleaseCheckerService>()
.GetGitHubReleaseToUpdateTo("MattEqualsCoder", "TestRepo", version ?? "", false);
if (newerGitHubRelease != null)
{
var response = MessageBox.Show("A new update was found! Do you want to go to the release page?", "New Update",
MessageBoxButton.YesNo);
if (response == MessageBoxResult.Yes)
{
var url = newerGitHubRelease.Url.Replace("&", "^&");
Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MattEqualsCoder.GitHubReleaseChecker:
Package | Downloads |
---|---|
MattEqualsCoder.MSURandomizer.Avalonia
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.