Skip to content

Commit

Permalink
chore: update gitversion config
Browse files Browse the repository at this point in the history
  • Loading branch information
coder2000 committed Jul 2, 2024
1 parent f9b5967 commit 5354d1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ mode: ContinuousDelivery
branches: {}
ignore:
sha: []
merge-message-formats: {}
18 changes: 9 additions & 9 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
FetchDepth = 0)]
[GitHubActions(
"continuous",
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.UbuntuLatest,
GitHubActionsImage.MacOsLatest,
OnPushBranchesIgnore = [MasterBranch, ReleaseBranchPrefix + "/*"],
Expand All @@ -50,9 +50,9 @@ class Build : NukeBuild
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

[Required] [GitRepository] readonly GitRepository GitRepository;
[Required] [GitVersion] readonly GitVersion GitVersion;
[Required] [Solution] readonly Solution Solution;
[Required][GitRepository] readonly GitRepository GitRepository;
[Required][GitVersion] readonly GitVersion GitVersion;
[Required][Solution] readonly Solution Solution;

AbsolutePath SourceDirectory => RootDirectory / "src";
AbsolutePath TestsDirectory => RootDirectory / "tests";
Expand Down Expand Up @@ -106,7 +106,7 @@ class Build : NukeBuild
SonarScannerBegin(_ => _
.SetProjectKey(SonarProjectKey)
.SetServer("https://sonarcloud.io")
.SetVersion(GitVersion.NuGetVersionV2)
.SetVersion(GitVersion.NuGetVersion)
.SetOpenCoverPaths(ArtifactsDirectory / "coverage.opencover.xml")
.SetProcessArgumentConfigurator(args => args.Add("/o:ubiety"))
.SetFramework("net8.0"));
Expand All @@ -124,7 +124,7 @@ class Build : NukeBuild
});

[Parameter] readonly bool Cover = true;
Project TestProject => Solution.GetProject("Ubiety.Stringprep.Tests");
Project TestProject => Solution.GetProject("Ubiety.Stringprep.Tests");

Target Test => _ => _
.DependsOn(Compile)
Expand All @@ -142,7 +142,7 @@ class Build : NukeBuild
});

string ChangelogFile => RootDirectory / "CHANGELOG.md";

Target Pack => _ => _
.DependsOn(Compile)
.After(Test)
Expand All @@ -153,7 +153,7 @@ class Build : NukeBuild
.SetNoBuild(InvokedTargets.Contains(Compile))
.SetConfiguration(Configuration)
.SetOutputDirectory(ArtifactsDirectory)
.SetVersion(GitVersion.NuGetVersionV2)
.SetVersion(GitVersion.NuGetVersion)
.SetPackageReleaseNotes(GetNuGetReleaseNotes(ChangelogFile, GitRepository)));
});

Expand All @@ -179,7 +179,7 @@ class Build : NukeBuild
.SetUsername(GitHubActions.Actor)
.SetPassword(GitHubToken));
}

DotNetNuGetPush(_ => _
.SetApiKey(NuGetKey)
.SetSource(Source)
Expand Down

0 comments on commit 5354d1d

Please sign in to comment.