@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.
51 lines • 2.69 kB
TypeScript
/** Semantic-Release Config Factory (dotnet)
* A functional Semantic-Release configuration for dotnet projects
*
* extends {@link baseConfig }
*
* <-- TABLE OF CONTENTS -->
* - evaluateProperties
* - configureDotnetRelease
* - Insert-Edit Plugins
* - Append Plugins
*
*/
import type { Options } from 'semantic-release';
/**
* TODO: options/params for inserts/edits. NOT ready for production. Currently, this can only add Git plugin's options if undefined or one or more is missing.
* Insert (`array.splice`) and/or configure plugins.\
* Can be used to...\
* ...load plugin A before plugin B\
* ...edit a plugin's existing configuration
*
* @param config An instance of {@link Options}
* @returns a modified copy of {@link config}
*/
export declare function insertAndEditPlugins(config: Options): Options;
/**
* Currently, only configures `@semantic-release/exec` with `prepareCmd: configurePrepareCmd(projectsToPublish, projectsToPackAndPush)` and `publishCmd: configureDotnetNugetPush()`
* @param config
* @param projectsToPublish
* @param projectsToPackAndPush
* @returns config with the specified plugins and plugin options.
*/
export declare function appendPlugins(config: Options, projectsToPublish: string[], projectsToPackAndPush: string[] | false): Options;
/**
* Configures {@link baseConfig} with `@semantic-release/exec` to `dotnet` publish, pack, and push.
* @param projectsToPublish An array of dotnet projects' relative paths. If
* empty or unspecified, tries getting projects' semi-colon-separated relative
* paths from the `PROJECTS_TO_PUBLISH` environment variable. If configured as
* recommended, the projects' publish outputs will be zipped to '$PWD/publish'
* for use in the `publish` semantic-release step (typically, GitHub release).
* @param projectsToPackAndPush An array of dotnet projects' relative paths. If
* false, `dotnet pack` and `dotnet nuget push` will be left out of the exec
* commands. If empty or unspecified, tries getting projects'
* semi-colon-separated relative paths from the `PROJECTS_TO_PACK_AND_PUSH`
* environment variable. If configured as recommended, `dotnet pack` will output
* the nupkg/snupk files to `$PWD/publish` where they will be globbed by `dotnet
* nuget push`.
* @returns a semantic-release Options object, based on `@halospv3/hce.shared-config` (our base config), with the `@semantic-release/exec` plugin configured to `dotnet publish`, `pack`, and `push` the specified projects.
*/
export declare function getConfig(projectsToPublish?: string[], projectsToPackAndPush?: string[] | false): Options;
export default getConfig;
//# sourceMappingURL=semanticReleaseConfigDotnet.d.ts.map