(rootDir: string, bumpFiles: BumpFile[], channel: string)
| 303 | * never written to git. Files already in the target channel dir are left alone. |
| 304 | */ |
| 305 | export async function moveBumpFilesToChannel(rootDir: string, bumpFiles: BumpFile[], channel: string): Promise<void> { |
| 306 | const { rename, mkdir } = await import('node:fs/promises'); |
| 307 | const dir = getBumpyDir(rootDir); |
| 308 | const channelDir = resolve(dir, channel); |
| 309 | await mkdir(channelDir, { recursive: true }); |
| 310 | for (const bf of bumpFiles) { |
| 311 | if (bf.channel === channel) continue; |
| 312 | const from = bf.channel ? resolve(dir, bf.channel, `${bf.id}.md`) : resolve(dir, `${bf.id}.md`); |
| 313 | await rename(from, resolve(channelDir, `${bf.id}.md`)); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | /** Delete consumed bump files */ |
| 318 | export async function deleteBumpFiles(rootDir: string, ids: string[]): Promise<void> { |
no test coverage detected
searching dependent graphs…