Module
helps manage and harmonise READMEs in many repositories with template files
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273import { runCommand } from "./utils.ts";
export const getRepository = ( directory: string, error: (message: string, error?: Error) => void,) => { return runCommand( [ "git", "-C", directory, "config", "--get", "remote.origin.url", ], error, true, );};
export const getTag = ( directory: string, error: (message: string, error?: Error) => void,) => { return runCommand( [ "git", "-C", directory, "describe", "--tags", "--abbrev=0", ], error, true, );};
export const getBranch = ( directory: string, error: (message: string, error?: Error) => void,) => { return runCommand( [ "git", "-C", directory, "rev-parse", "--abbrev-ref", "HEAD", ], error, true, );};
export const getCommit = ( directory: string, error: (message: string, error?: Error) => void,) => { return runCommand( [ "git", "-C", directory, "rev-parse", "HEAD", ], error, true, );};