()
| 36 | * @throws error if the exec command fails. |
| 37 | */ |
| 38 | export const getGitRepoRoot = (): string => { |
| 39 | const gitRepoRoot = ( |
| 40 | execSync('git rev-parse --show-toplevel', { |
| 41 | encoding: 'utf-8', |
| 42 | }) || '' |
| 43 | ).trim(); |
| 44 | |
| 45 | if (!gitRepoRoot) { |
| 46 | throw new Error(`Git repo returned empty value`); |
| 47 | } |
| 48 | |
| 49 | return gitRepoRoot; |
| 50 | }; |
| 51 | |
| 52 | /** |
| 53 | * getLatestGitHubRelease returns the release tag as a string. |
no outgoing calls
no test coverage detected