jsii-release
Version:
Release jsii modules to multiple package managers
115 lines (114 loc) • 2.65 kB
TypeScript
/**
* Encapsulates some information about the release.
*/
export interface GoRelease {
/**
* The tags the release created.
*/
readonly tags?: string[];
/**
* The commit message of the release.
*/
readonly commitMessage?: string;
/**
* The directory where the repository was released from.
*/
readonly repoDir?: string;
}
/**
* Properties for `GoReleaser`.
*/
export interface GoReleaserProps {
/**
* The source code directory.
*
* @default 'dist/go'
*/
readonly dir?: string;
/**
* Execute a dry run only.
*
* @default false
*/
readonly dryRun?: boolean;
/**
* The branch to push to.
*
* @default 'main'
*/
readonly branch?: string;
/**
* The username to use for the commit.
*
* @default - taken from git config. throws if not configured.
*/
readonly username?: string;
/**
* The email to use for the commit.
*
* @default - taken from git config. throws if not configured.
*/
readonly email?: string;
/**
* The version.
*
* @default - taken from the 'version'. throws if doesn't exist.
*/
readonly version?: string;
/**
* The message to use for the commit marking the release.
*/
readonly message?: string;
}
/**
* Information about a specific module.
*/
export interface GoModule {
/**
* Path to the mod file.
*/
readonly modFile: string;
/**
* The version of the module.
*/
readonly version: string;
/**
* The cannonical name of the module. (e.g 'github.com/aws/constructs-go/constructs/v3`)
*/
readonly cannonicalName: string;
/**
* The path inside the repository the module is located in. (e.g 'constructs')
*/
readonly repoPath: string;
/**
* The repository URL. (e.g 'github.com/aws/constructs')
*/
readonly repoURL: string;
}
/**
* Release a set of Golang modules.
*/
export declare class GoReleaser {
private readonly version?;
private readonly gitCommitMessage?;
private readonly dir;
private readonly dryRun;
private readonly gitBranch;
private readonly gitUsername;
private readonly gitUseremail;
constructor(props: GoReleaserProps);
/**
* Run the release process.
*
* @returns metadata about the release.
*/
release(): GoRelease;
private doRelease;
private collectModules;
private parseModule;
private buildTagName;
private buildReleaseMessage;
private syncRepo;
private extractRepoURL;
private extractVersion;
}