-
Notifications
You must be signed in to change notification settings - Fork 247
Adding version check to startup #2567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
d273971
a458873
7ed7a11
5635d3f
0f57e40
9448942
66e37ca
da3d997
5b0736c
358b111
52e6f2a
141a0f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,13 @@ public class Program | |
|
||
public static void Main(string[] args) | ||
{ | ||
// Compare current version of DAB with latest (non-rc) version in NuGet. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this change work for the docker scenario too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'd need to test to be sure. My gut says no. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it fails to reach NuGet it does not emit a warning. |
||
VersionChecker.GetVersions(out string? latestVersion, out string? currentVersion); | ||
JerryNixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if (!string.IsNullOrEmpty(latestVersion) && latestVersion != currentVersion) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what if people clone the repo, their currentVersion might be > latestVersion. Saying newer version is available doesn't make sense in that scenario, we should check for latestVersion > currentVersion |
||
{ | ||
Console.Error.WriteLine($"A newer version of Data API builder is available. {currentVersion} -> {latestVersion}"); | ||
JerryNixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
if (!ValidateAspNetCoreUrls()) | ||
{ | ||
Console.Error.WriteLine("Invalid ASPNETCORE_URLS format. e.g.: ASPNETCORE_URLS=\"http://localhost:5000;https://localhost:5001\""); | ||
|
Uh oh!
There was an error while loading. Please reload this page.