Skip to content

Commit

Permalink
Merge pull request #711 from adamralph/simple-exec-9.1.0-alpha.1
Browse files Browse the repository at this point in the history
update SimpleExec from 9.0.0 to 9.1.0-alpha.1
  • Loading branch information
adamralph authored Mar 12, 2022
2 parents 8b3d815 + 062155d commit ecff9d3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MinVerTests.Infra/MinVerTests.Infra.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0" />
<PackageReference Include="SimpleExec" Version="9.0.0" />
<PackageReference Include="SimpleExec" Version="9.1.0-alpha.1" />
</ItemGroup>

</Project>
19 changes: 14 additions & 5 deletions targets/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#pragma warning disable CA1812 // https://github.com/dotnet/roslyn-analyzers/issues/5628
using System;
using System.Collections.Generic;
using System.Linq;
using MinVerTests.Infra;
using static Bullseye.Targets;
using static SimpleExec.Command;

var testFx = Environment.GetEnvironmentVariable("MINVER_TESTS_FRAMEWORK") ?? "net6.0";
var testLoggers = "--logger \"console;verbosity=normal\"";
var testLoggerArgs = new List<string> { "--logger", "\"console;verbosity=normal\"", };

if (Environment.GetEnvironmentVariable("GITHUB_ACTIONS")?.ToUpperInvariant() == "TRUE")
{
testLoggers += " --logger GitHubActions";
testLoggerArgs.AddRange(new[] { "--logger", "GitHubActions", });
}

Target("build", () => RunAsync("dotnet", "build --configuration Release --nologo"));
Expand All @@ -18,13 +20,13 @@
"test-lib",
"test the MinVer.Lib library",
DependsOn("build"),
() => RunAsync("dotnet", $"test ./MinVerTests.Lib --framework {testFx} --configuration Release --no-build --nologo {testLoggers}"));
() => RunAsync("dotnet", new[] { "test", "./MinVerTests.Lib", "--framework", testFx, "--configuration", "Release", "--no-build", "--nologo", }.Concat(testLoggerArgs)));

Target(
"test-packages",
"test the MinVer package and the minver-cli console app",
DependsOn("build"),
() => RunAsync("dotnet", $"test ./MinVerTests.Packages --configuration Release --no-build --nologo {testLoggers}"));
() => RunAsync("dotnet", new[] { "test", "./MinVerTests.Packages", "--configuration", "Release", "--no-build", "--nologo", }.Concat(testLoggerArgs)));

Target(
"eyeball-minver-logs",
Expand All @@ -41,9 +43,16 @@
await Git.Tag(path, "v.2.3.4-alpha.5");
await Git.Commit(path);

var args = new List<string> { "build", "--no-restore", };

if (!Sdk.Version.StartsWith("2.", StringComparison.Ordinal))
{
args.Add("--nologo");
}

await RunAsync(
"dotnet",
$"build --no-restore{(Sdk.Version.StartsWith("2.", StringComparison.Ordinal) ? "" : " --nologo")}",
args,
path,
configureEnvironment: env =>
{
Expand Down
2 changes: 1 addition & 1 deletion targets/Targets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Bullseye" Version="4.0.0" />
<PackageReference Include="SimpleExec" Version="9.0.0" />
<PackageReference Include="SimpleExec" Version="9.1.0-alpha.1" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit ecff9d3

Please sign in to comment.