UNPKG

@atomist/sdm

Version:

Atomist Software Delivery Machine SDK

47 lines 2.18 kB
import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext"; import { GitProject } from "@atomist/automation-client/lib/project/git/GitProject"; import { ExecuteGoal, GoalInvocation } from "../../../../api/goal/GoalInvocation"; import { SdmGoalEvent } from "../../../../api/goal/SdmGoalEvent"; import { ProgressLog } from "../../../../spi/log/ProgressLog"; 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