@halospv3/hce.shared-config
Version:
Automate commit message quality, changelogs, and CI/CD releases. Exports a semantic-release shareable configuration deserialized from this package's '.releaserc.yml'. Shared resources for .NET projects are also distributed with this package.
63 lines • 3.28 kB
TypeScript
import { type Type } from 'arktype';
import { MSBuildProject } from './MSBuildProject.js';
import { NugetRegistryInfo } from './NugetRegistryInfo.js';
import type { Default } from 'arktype/internal/attributes.ts';
/**
* Build a prepareCmd string from .NET projects.\
* This will include a `dotnet publish` for each project's RID and TFM permutation,\
* `dotnet pack` for each project with output paths separated by NuGet Source and PackageId,\
* and `dotnet nuget sign` for each nupkg output directory.
* @todo parse Solution files to publish all projects with default Publish parameters (as evaluated by MSBuild).
* @param projectsToPublish An array of relative or full file paths of `.csproj`
* projects -OR- an array of {@link MSBuildProject} objects.
* The project paths will be passed to `dotnet publish` commands.
* @param projectsToPackAndPush
* Relative and/or full file paths of projects to pass to `dotnet pack`. If
* string[], only the default NuGet Source will be used. If GitHub, GitLab,
* etc. are also desired, pass {@link NugetRegistryInfo}[]
* @param dotnetNugetSignOpts A {@link DotnetNugetSignOptions} object. The value
* of the `--output` argument will be set to {@link ourDefaultPubDir} if `undefined`.
* @returns A single string of CLI commands joined by ' && '
*/
export declare function configurePrepareCmd(projectsToPublish: string[] | MSBuildProject[], projectsToPackAndPush?: string[] | NugetRegistryInfo[], dotnetNugetSignOpts?: typeof DotnetNugetSignOptions.inferIn): Promise<string>;
/**
* Prepare the CLI command to push NuGet packages. This should added to the `publishCmd` option of `@semantic-release/exec`
*
* Ensure your verifyConditionsCmd is set to prevent releases failing due to bad tokens or packages!
* See {@link NugetRegistryInfo#PackDummyPackage}, {@link NugetRegistryInfo#GetPushDummyCommand}
* @param registryInfos an array of {@link NugetRegistryInfo} (or derived classes) instances.
* @param packageOutputPath Default: `${cwd()}/publish`.\
* The directory at which dotnet outputs the given projects' packages. Passed to
* `dotnet pack` via the `--output` argument.
* @returns a string of `dotnet pack` and `dotnet push` commands, joined by ' && '.
*/
export declare function configureDotnetNugetPush(registryInfos: NugetRegistryInfo[], packageOutputPath?: string): string;
declare const DotnetNugetSignOptions: Type<{
timestamper: Default<string, 'https://rfc3161.ai.moda/'>;
certificatePassword?: string | undefined;
hashAlgorithm?: string | undefined;
output?: string | undefined;
overwrite?: true | undefined;
timestampHashAlgorithm?: string | undefined;
verbosity?: 'q' | 'quiet' | 'm' | 'minimal' | 'n' | 'normal' | 'd' | 'detailed' | 'diag' | 'diagnostic';
} & ({
certificatePath: string;
certificateSubjectName: string;
} | {
certificatePath: string;
certificateFingerprint: string;
} | {
certificateStoreName: string;
certificateSubjectName: string;
} | {
certificateStoreName: string;
certificateFingerprint: string;
} | {
certificateStoreLocation: string;
certificateSubjectName: string;
} | {
certificateStoreLocation: string;
certificateFingerprint: string;
})>;
export {};
//# sourceMappingURL=helpers.d.ts.map