@dappnode/dappnodesdk
Version:
dappnodesdk is a tool to make the creation of new dappnode packages as simple as possible. It helps to initialize and publish in ethereum blockchain
32 lines (31 loc) • 837 B
TypeScript
export interface GitHead {
/**
* From `git rev-parse --verify HEAD`
* Returns `"d51ad2ff51488eaf2bfd5d6906f8b20043ed3b42"`
*/
commit: string;
/**
* From `git rev-parse --abbrev-ref HEAD`
* Returns `"master"`
*/
branch: string;
}
/**
* @returns example:
* ```
* commit: "d51ad2ff51488eaf2bfd5d6906f8b20043ed3b42"
* branch: "dapplion/prepare-build-action"
* ```
*/
export declare function getGitHead(): Promise<GitHead>;
/**
* Return gitHead if the repo is initialized and includes a revision
* Otherwise, ignore
*/
export declare function getGitHeadIfAvailable(options?: {
requireGitData?: boolean;
}): Promise<GitHead | undefined>;
/**
* @param branch dappnodebot/bump-upstream/go-ipfs@v0.7.0
*/
export declare function getLocalBranchExists(branch: string): Promise<boolean>;