Skip to content
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

⬆️ Bump files with dotnet-file sync #24

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .netconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
weak
[file "src/dotnet-retest/TrxCommand.cs"]
url = https://github.com/devlooped/dotnet-trx/blob/main/src/dotnet-trx/TrxCommand.cs
sha = b3022d21ff5bcd0abdd39c28369d81503a9a0a09
etag = 37e2d94cad94e4becb80c0dc2770a9ee6a797e9b0df35684b05b46042bdc67f9
sha = e2817844b7a87ca5492d984711dc2ce84f58377e
etag = 629a31f3489e663ef439c5887f39b92594589d3447bc1e47fe91f2c24337de34
weak
[file "src/dotnet-retest/Process.cs"]
url = https://github.com/devlooped/dotnet-trx/blob/main/src/dotnet-trx/Process.cs
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ dotnet tool update -g dotnet-retest
[![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png "Vezel")](https://github.com/vezel-dev)
[![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png "ChilliCream")](https://github.com/ChilliCream)
[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png "4OTC")](https://github.com/4OTC)
[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png "Vincent Limo")](https://github.com/v-limo)


<!-- sponsors.md -->
Expand Down
8 changes: 4 additions & 4 deletions src/dotnet-retest/TrxCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Xml.Linq;
using Devlooped.Web;
using Humanizer;
using NuGet.Common;
using Spectre.Console;
using Spectre.Console.Cli;
using static Devlooped.Process;
Expand All @@ -22,7 +21,6 @@ public partial class TrxCommand : Command<TrxCommand.TrxSettings>
{
const string Header = "<!-- header -->";
const string Footer = "<!-- footer -->";
const string Signature = "<!-- trx -->";

static string Author =>
$"from [{ThisAssembly.Project.PackageId}]({ThisAssembly.Project.PackageProjectUrl}) v{ThisAssembly.Project.Version} on {RuntimeInformation.FrameworkDescription} with [:purple_heart:](https://github.com/sponsors/devlooped)";
Expand Down Expand Up @@ -78,6 +76,9 @@ public class TrxSettings : CommandSettings

public override int Execute(CommandContext context, TrxSettings settings)
{
if (Environment.GetEnvironmentVariable("RUNNER_DEBUG") == "1")
WriteLine(JsonSerializer.Serialize(new { settings }, new JsonSerializerOptions { WriteIndented = true }));

var path = settings.Path ?? Directory.GetCurrentDirectory();
if (!Path.IsPathFullyQualified(path))
path = Path.Combine(Directory.GetCurrentDirectory(), path);
Expand Down Expand Up @@ -375,8 +376,7 @@ static StringBuilder AppendBadges(Summary summary, StringBuilder builder, string
}

if (settings.GitHubSummary &&
Environment.GetEnvironmentVariable("GITHUB_STEP_SUMMARY") is { Length: > 0 } summaryPath &&
File.Exists(summaryPath))
Environment.GetEnvironmentVariable("GITHUB_STEP_SUMMARY") is { Length: > 0 } summaryPath)
{
File.AppendAllText(summaryPath,
AppendBadges(summary, new(), elapsed, jobUrl)
Expand Down