(opts: TagWithDeps)
| 142 | } |
| 143 | |
| 144 | export async function tagWith(opts: TagWithDeps): Promise<void> { |
| 145 | const dir = opts.dir ?? "/"; |
| 146 | try { |
| 147 | await opts.git.tag({ |
| 148 | fs: opts.fs, |
| 149 | dir, |
| 150 | ref: opts.name, |
| 151 | object: opts.object, |
| 152 | force: opts.force, |
| 153 | }); |
| 154 | } catch (cause) { |
| 155 | if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause }); |
| 156 | throw new GitError("ETAGFAIL", `git tag failed: ${errorMessage(cause)}`, { cause }); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | export interface GitTagDeleteOptions { |
| 161 | dir?: string; |
no test coverage detected