Grapeyard.Labs.Nuke.Launchpad.Common 0.3.0

dotnet add package Grapeyard.Labs.Nuke.Launchpad.Common --version 0.3.0
NuGet\Install-Package Grapeyard.Labs.Nuke.Launchpad.Common -Version 0.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Grapeyard.Labs.Nuke.Launchpad.Common" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Grapeyard.Labs.Nuke.Launchpad.Common --version 0.3.0
#r "nuget: Grapeyard.Labs.Nuke.Launchpad.Common, 0.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Grapeyard.Labs.Nuke.Launchpad.Common as a Cake Addin
#addin nuget:?package=Grapeyard.Labs.Nuke.Launchpad.Common&version=0.3.0

// Install Grapeyard.Labs.Nuke.Launchpad.Common as a Cake Tool
#tool nuget:?package=Grapeyard.Labs.Nuke.Launchpad.Common&version=0.3.0

NUKE Launchpad Common

Common feature extensions for the build automation tool NUKE for C# and .NET.

Installation

After setting up a NUKE build project as described in the NUKE documentation, preferably install NUKE Launchpad by adding the package Grapeyard.Labs.Nuke.Launchpad to it as a NuGet dependency using a NuGet package manager or by adding it manually to its project file:

<PackageReference Include="Grapeyard.Labs.Nuke.Launchpad" Version="0.3.0" />

This will automatically install all packages that are part of NUKE Launchpad and their transitive dependencies. If only the common feature extensions are actually needed, install this package individually instead.

If the installation fails with NuGet error NU1202, upgrade the target framework of the NUKE build project to a compatible version first – net7.0 or above – using its project properties or manually via its project file:

<TargetFramework>net7.0</TargetFramework>
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Grapeyard.Labs.Nuke.Launchpad.Common:

Package Downloads
Grapeyard.Labs.Nuke.Launchpad.Parameters

Predefined build parameters for the build automation tool NUKE for C# and .NET.

Grapeyard.Labs.Nuke.Launchpad.Targets

Predefined build targets for the build automation tool NUKE for C# and .NET.

Grapeyard.Labs.Nuke.Launchpad

Quickstart and extension library for the build automation tool NUKE for C# and .NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.0 121 3/14/2024
0.2.0 173 1/8/2024
0.1.1 145 9/8/2023
0.1.0 144 9/6/2023

• Added string constants for invariant Git command output to the Constants class.
• Added the following methods to the ExtendedAssert class:
   ◦ Methods ElementsCouldBeFileNames and ElementsCouldBeFilePaths that check whether elements of an enumerable of strings are valid file names or file paths.
   ◦ Method NoWhiteSpaces that checks whether strings do not contain white-space characters.
• Added class DocumentingTasks with method UpdateVersionOfNuGetPackageReferences that updates the version of NuGet package references within elements of an input enumerable for a specific NuGet package identifier.
• Added class AbsolutePathComparer that can be used as a comparer to sort absolute paths using ordinal sort rules.
• Added class AbsolutePathExtensions with the following methods:
   ◦ Methods CombineToNonself, CombineToNonselfAndNonParent, CombineToSubpath and CombineToSubpathOrSelf that combine an absolute and a relative path and validate the result based on a given assumption.
   ◦ Method HasAnyExtension that determines whether an absolute path ends with any element of an enumerable of extensions.
   ◦ Method HasSamePathRootAs that determines whether two absolute paths have the same path root.
   ◦ Method IsContainedIn that determines whether an absolute path is contained in, but not equal to, another absolute path.
   ◦ Methods IsContainedInAny and IsContainedInAnyOf that determine whether an absolute path is contained in, but not equal to, any element of an enumerable of absolute paths.
• Added class ProjectExtensions with the following methods:
   ◦ Method GetNames that returns the names of projects.
   ◦ Method GetPackageIds that returns the NuGet package identifiers of projects.
• Added class SolutionExtensions with the following methods:
   ◦ Method GetAllProjectsExcept that returns all projects of a solution, except those whose names match an excluded project name.
   ◦ Methods GetAllProjectNames and GetAllProjectNamesExcept that return the names of projects of a solution.
   ◦ Method GetBuildProjectName that returns the name of the NUKE build project of a solution.
   ◦ Methods GetPackageIdsOfAllProjects and GetPackageIdsOfAllProjectsExcept that return the NuGet package identifiers of projects of a solution.
• Added method WhenOtherwise to the ToolSettingsExtensions class, that allows an if-else-statement to be evaluated within a tool settings method chain.
• Added class ExtendedGitTasks with the following methods:
   ◦ Methods GitBranch and GitBranchList that retrieve the branches of a local Git repository.
   ◦ Method GitExitHandlerThatIgnoresEmptyCommits that can be used as a less restrictive exit handler for Git commit commands.
   ◦ Method GitRemote that retrieves the remote repositories tracked by a local Git repository.
   ◦ Methods GitStatusShort and GitStatusShortBranch that retrieve the status of a local Git repository in a short format.
   ◦ Methods GitTag and GitTagList that retrieve the tags of a local Git repository.
   ◦ Methods GetToplevelGitDirectory and GitRevParseShowToplevel that retrieve the top-level directory of a local Git repository.
   ◦ Method GitTracksRemote that checks whether a local Git repository tracks a specific remote repository.
   ◦ Method IsGitStatusShortClean that evaluates the status of a local Git repository in short format regarding pending changes.
• Added the following methods to the GitRepositoryExtensions class:
   ◦ Methods ContainsBranch and ContainsTag that check whether a branch or a tag exist in a local Git repository.
   ◦ Method HasDetachedHead that checks whether the HEAD of a local Git repository is currently detached.
   ◦ Method TracksRemote that checks whether a local Git repository tracks a specific remote repository.
• Added an optional parameter to all methods of the IEnumerableExtensions class that join strings together, which allows specifying a different separator for the last two elements.
• Added method OrderAndDistinctBy to the IEnumerableExtensions class, that sorts the elements of an enumerable in ascending order before removing duplicates based on a given equality comparison function.
• Added class HashCodeExtensions with method AddElementsOf that simplifies calculation of hash codes for enumerables.
• Added the following methods to the StringExtensions class:
   ◦ Method ToBuildParameterName that reformats strings into the naming convention used for NUKE build parameters. The convention mirrors the Kebab case naming convention, but uses two hyphens as a prefix.
   ◦ Method ToKebabCase that reformats strings into the Kebab case naming convention.
• Added parameter interface IHasDocumentation that contains build parameters for a documentation directory and file extensions utilized for documentation.
• Added parameter interface IUsesImplicitBuildSteps that contains an auxiliary build parameter to enable/disable implicit build steps in all build targets that support it.
• Added parameter interface IUsesVerboseLogging that contains an auxiliary build parameter to enable/disable verbose logging in all build targets that support it.
• Added configuration property ImplicitRestore to the ICompileWithDotNet target surrogate interface, that allows disabling implicit restores during a target run.
• Added method GetCustomDocumentationModifications to the IFinalizeVersion target base interface, that can be overridden to expand the repository finalization process.
• Added configuration property TargetRemote to the IFinalizeVersionForGrapeyardLabs and IFinishVersionForGrapeyardLabs target surrogate interfaces, that allows setting the target Git remote repository to which all changes are pushed.
• Added build target Sign with target base interface ISign, that can be extended to sign packages with a certificate.
• Added configuration property ImplicitBuild to the IIntegrationTestWithDotNet, IUnitTestWithDotNet and IPackWithDotNet target surrogate interfaces, that allows disabling implicit builds during a target run.
• Added build target UpdateDocumentedNuGetPackageReferencesOfProjects with target surrogate interface IUpdateDocumentedNuGetPackageReferencesOfProjectsToNewest as default implementation, that updates NuGet package references for projects of a solution in documentation files to the newest version. Also added build targets UpdateDocumentation and UpdateDocumentedNuGetPackageReferences that bundle it.
• Renamed parameters of methods FileExistsInDirectory and PublishFileToDirectory of the ExtendedFileSystemTasks class to be more purposeful.
• Moved method GetWebApplicationUrl from the GitServiceProviderTasks class to the GitRepositoryExtensions class to make it more concise to use.
• Changed visibility of class GitServiceProviderTasks to internal.
• Altered the format of build parameter names in exceptions thrown for invalid parameter values in the following methods:
   ◦ Methods RequirementVerified and SecretVerified of the ObjectExtensions class.
   ◦ All internal validation methods of parameter interfaces.
• Improved the error messages for all build parameters that are relative paths regarding existing path roots.
• Renamed all optional parameter interfaces to use the prefix IUses instead of IHas to better distinguish them from transitive parameter interfaces:
   ◦ Parameter interface IHasGitRepository to IUsesGitRepository.
   ◦ Parameter interface IHasGitVersion to IUsesGitVersion.
   ◦ Parameter interface IHasSemanticVersion to IUsesSemanticVersion.
• Renamed the following build parameters with ambiguous abbreviations:
   ◦ Parameter --local-package-repo-dirs of the IHasLocalPackageRepositories parameter interface to --local-package-repository-dirs.
   ◦ Parameters --web-package-repo-source-url and --web-package-repo-api-key of the IHasWebPackageRepository parameter interface to --web-package-repository-source-url and --web-package-repository-api-key.
• Added an additional layer of validation to the following build parameters to prevent them from targeting the repository root directory or one of its parents, as they may be deleted during cleanup operations:
   ◦ Parameter --packages-dir of the IHasPackages parameter interface.
   ◦ Parameter --test-results-dir of the IHasTestResults parameter interface.
• Modified target surrogate interface ICompileWithDotNet so that built binaries and dependencies for projects are not automatically published using the dotnet publish command. Added new configuration properties DegreeOfParallelism, DotNetPublishSettingsPerProject and ProjectsToPublish to control the usage and scope of the command.
• Modified target surrogate interfaces ICompileWithDotNet and IPackWithDotNet to exclude the suffix ".git" from the RepositoryUrl property value of utilized dotnet commands when using Git as the version control system.
• Added an optional parameter to multiple methods of target base interface IFinalizeVersion, allowing to specify the top-level directory path of the local Git repository.
• Changed the order of item finalization in method FinalizeRepository of target base interface IFinalizeVersion so that individual files are always finalized before directories. This prevents commit messages from being lost  for files that are also contained in any of the directories.
• Removed the requirement check for an existing Git service provider from target surrogate interfaces IFinalizeVersionForGrapeyardLabs and IFinishVersionForGrapeyardLabs, allowing the targets defined by them to run when using local Git remotes.
• Added additional layers of requirement checks to target surrogate interface IFinishVersionForGrapeyardLabs, making target FinishVersion fail early if the branches master or develop do not exist locally or if the targeted tag name already exists locally.
• Made build targets Pack and Publish regard NuGet symbol packages as produced artifacts, when implementing target surrogate interfaces IPackWithDotNet and IPublishToLocalPackageRepositoriesForDotNet.
• Renamed method PublishPackagesToLocalRepositories of the IPublishToLocalPackageRepositories target base interface to PublishPackagesToLocalPackageRepositories to more accurately reflect the name of the interface. Also generalized the object type of its first parameter, making the method more universally usable.
• Changed the relationship of build targets PublishToLocalPackageRepositories and PublishToWebPackageRepository to the Test build target to a direct dependency so that tests are run by default when publishing packages.
• Changed the dependency behavior of build targets IntegrationTest and UnitTest so that skipping these build targets also skips the Compile build target.
• Updated NuGet package Nuke.Common from version 7.0.6 to 8.0.0.
• Removed method GetStatusShort from the GitRepositoryExtensions class in favor of method GitStatusShort from the new ExtendedGitTasks class.
• Removed the optional Git output parameter from method HasCleanStatus of the GitRepositoryExtensions class as it has been changed into a convenience wrapper for successive calls to methods GitStatusShortBranch and GitHasCleanStatusShort of the new ExtendedGitTasks class.
• Removed the optional Git output parameter from method FinalizeRepository of target base interface IFinalizeVersion to prevent passing Git output to it that was retrieved using an unexpected working directory, which is a potential source of error.
• Fixed the health of generated NuGet packages concerning the points Source Link and Compiler Flags by emitting debugging information into the binaries of builds using the Release build configuration.
• Fixed the health of generated NuGet packages concerning the point Deterministic (dll/exe) by making CI/CD pipelines pack and publish them.
• Fixed a bug that caused the overloaded method GitAddAndCommit of the IFinalizeVersion target base interface to throw an exception for empty commits instead of returning false.
• Fixed the following bugs related to build target FinalizeVersion in target surrogate interface IFinalizeVersionForGrapeyardLabs:
   ◦ Fixed a bug that caused the build target to use incorrect relative file or directory paths if the NUKE root directory did not match the top-level Git directory.
   ◦ Fixed a bug that caused the build target to fail with an exception if there were only changes in the repository that Git automatically replaced when added (e.g. incorrect line endings).
   ◦ Fixed a bug that caused the build target to attempt to push a detached Git HEAD to the remote instead of preemptively failing the build execution.
• Fixed a bug that caused build target FinishVersion to attempt to merge a detached Git HEAD into the master branch instead of preemptively failing the build execution, when implementing target surrogate interface IFinishVersionForGrapeyardLabs.

Full changelog at https://gitlab.com/grapeyard-labs/libs/nuke-launchpad/-/blob/0.3.0/CHANGELOG.md