@atomist/sdm-core
Version:
Atomist Software Delivery Machine - Implementation
44 lines • 1.96 kB
TypeScript
import { GitProject, HandlerContext } from "@atomist/automation-client";
import { ExecuteGoal, GoalInvocation, ProgressLog, SdmGoalEvent } from "@atomist/sdm";
export declare type ProjectVersioner = (status: SdmGoalEvent, p: GitProject, log: ProgressLog) => Promise<string>;
/**
* Version the project with a build specific version number
* @param projectLoader used to load projects
* @param projectVersioner decides on the version string
*/
export declare function executeVersioner(projectVersioner: ProjectVersioner): ExecuteGoal;
/**
* Get prerelease, i.e., timestamped, version associated with the goal
* set for the provided goal invocation. The Version goal must be
* executed within the goal set prior to calling this function.
*
* @param gi Goal invocation
* @return Prerelease semantic version string
*/
export declare function goalInvocationVersion(gi: GoalInvocation): Promise<string | undefined>;
/** Object wrapping [[getGoalVersion]] function arguments. */
export interface GetGoalVersionArguments {
/** Context providing a graph client. */
context: HandlerContext;
/** Repository owner, i.e., user or organization. */
owner: string;
/** Git repository provider identifier. */
providerId: string;
/** Repository name. */
repo: string;
/** Commit SHA. */
sha: string;
/** Branch, "master" if not provided */
branch?: string;
}
/**
* Read and return prerelease version for the goal set associated with
* the provided commit.
*
* @param args Properties determining which version to retrieve
* @return Prerelease semantic version string
*/
export declare function getGoalVersion(args: GetGoalVersionArguments): Promise<string | undefined>;
/** See getGoalVersion. */
export declare function readSdmVersion(owner: string, repo: string, providerId: string, sha: string, branch: string, context: HandlerContext): Promise<string | undefined>;
//# sourceMappingURL=projectVersioner.d.ts.map