File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ using Microsoft . Extensions . Logging ;
2+
3+ namespace Microsoft . DevProxy ;
4+
5+ public static class OutdatedCommandHandler
6+ {
7+ public static async Task CheckVersion ( ILogger logger )
8+ {
9+ var releaseInfo = await UpdateNotification . CheckForNewVersion ( ProxyCommandHandler . Configuration . NewVersionNotification ) ;
10+ logger . LogInformation ( releaseInfo ? . Version ) ;
11+ }
12+ }
13+
Original file line number Diff line number Diff line change 22// Licensed under the MIT License.
33
44using Microsoft . DevProxy . Abstractions ;
5+ using Microsoft . Extensions . Configuration ;
56using Microsoft . Extensions . Logging ;
67using System . CommandLine ;
78using System . Net ;
@@ -300,6 +301,11 @@ public RootCommand GetRootCommand(IProxyLogger logger)
300301
301302 command . Add ( presetCommand ) ;
302303
304+ var outdatedCommand = new Command ( "outdated" , "Check for new version" ) ;
305+
306+ outdatedCommand . SetHandler ( async ( ) => await OutdatedCommandHandler . CheckVersion ( logger ) ) ;
307+ command . Add ( outdatedCommand ) ;
308+
303309 return command ;
304310 }
305311
You can’t perform that action at this time.
0 commit comments