Skip to content

Commit

Permalink
Add Red Hat base distro to supported list (#4946)
Browse files Browse the repository at this point in the history
* Add Red Hat based distro (Oracle Linux) to supported list
* Fix FF using bug
  • Loading branch information
ismayilov-ismayil authored Aug 26, 2024
1 parent c2f1c4f commit 3d25a34
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
8 changes: 8 additions & 0 deletions src/Agent.Listener/net8.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
}
]
},
{
"id": "ol",
"versions": [
{
"name": "8+"
}
]
},
{
"id": "macOS",
"versions": [
Expand Down
29 changes: 16 additions & 13 deletions src/Agent.Worker/JobExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,27 @@ public async Task<List<IStep>> InitializeJob(IExecutionContext jobContext, Pipel

PackageVersion agentVersion = new PackageVersion(BuildConstants.AgentPackage.Version);

// Check if a system supports .NET 8
try
if (!AgentKnobs.Net8UnsupportedOsWarning.GetValue(context).AsBoolean())
{
Trace.Verbose("Checking if your system supports .NET 8");
// Check if a system supports .NET 8
try
{
Trace.Verbose("Checking if your system supports .NET 8");

// Check version of the system
if (!await PlatformUtil.IsNetVersionSupported("net8"))
// Check version of the system
if (!await PlatformUtil.IsNetVersionSupported("net8"))
{
string systemId = PlatformUtil.GetSystemId();
SystemVersion systemVersion = PlatformUtil.GetSystemVersion();
context.Warning(StringUtil.Loc("UnsupportedOsVersionByNet8", $"{systemId} {systemVersion}"));
}
}
catch (Exception ex)
{
string systemId = PlatformUtil.GetSystemId();
SystemVersion systemVersion = PlatformUtil.GetSystemVersion();
context.Warning(StringUtil.Loc("UnsupportedOsVersionByNet8", $"{systemId} {systemVersion}"));
Trace.Error($"Error has occurred while checking if system supports .NET 8: {ex}");
context.Warning(ex.Message);
}
}
catch (Exception ex)
{
Trace.Error($"Error has occurred while checking if system supports .NET 8: {ex}");
context.Warning(ex.Message);
}

// Set agent version variable.
context.SetVariable(Constants.Variables.Agent.Version, BuildConstants.AgentPackage.Version);
Expand Down

0 comments on commit 3d25a34

Please sign in to comment.