UNPKG

aws-delivlib

Version:

A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.

83 lines (82 loc) 2.47 kB
import { Construct } from 'constructs'; import { AutoPullRequest, AutoPullRequestOptions } from './pr'; import { WritableGitHubRepo } from '../repo'; /** * Properties for configuring the head branch of the bump PR. */ export interface AutoBumpHead { /** * The name of branch. Will be created if it doesn't exist. * * $VERSION will be substituted by the current version (obtained by executing `versionCommand`). * * @default 'bump/$VERSION' */ readonly name?: string; /** * @see 'source' property in AutoPullRequest.Head */ readonly source?: string; } /** * Options for configuring an Auto Bump project. */ export interface AutoBumpProps extends AutoPullRequestOptions { /** * The repository to create a PR in. */ repo: WritableGitHubRepo; /** * The command to execute in order to bump the repo. * * The bump command is responsible to bump any version metadata, update * CHANGELOG and commit this to the repository. * * @default '/bin/bash ./bump.sh' */ bumpCommand?: string; /** * The command to determine the current version. * * This is the value that will be used to evaluate $VERSION. * * @default 'git describe' (the latest git tag will be used to determine the current version) */ versionCommand?: string; /** * Title of the PR. * * $VERSION will be substituted by the current version (obtained by executing `versionCommand`). * * @default' chore(release): $VERSION' */ title?: string; /** * Body of the PR. * * @default 'See [CHANGELOG](https://github.com/${props.repo.owner}/${props.repo.repo}/blob/${head}/CHANGELOG.md)' * (Link to the CHANGELOG file of the head branch) */ body?: string; /** * The head branch of the PR. * * $VERSION will be substituted by the current version (obtained by executing `versionCommand`). * * @default - Wil be created from master and named 'bump/$VERSION' */ head?: AutoBumpHead; /** * Description string for the CodeBuild project * * @default - A default description */ readonly projectDescription?: string; } export declare class AutoBump extends Construct { /** * The underlying AutoPullRequest construct. */ readonly pr: AutoPullRequest; constructor(parent: Construct, id: string, props: AutoBumpProps); }