Skip to content

Commit

Permalink
Merge pull request #503 from rtyley/do-not-persist-summary-that-is-sp…
Browse files Browse the repository at this point in the history
…ecific-a-single-run

Don't persist the `run-summary.md` file beyond its own run
  • Loading branch information
alejandrohdezma authored Jun 16, 2023
2 parents b6f8161 + 2a1bf31 commit 916e71f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/workspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ test('`Workspace.saveWorkspaceCache()` → saves cache', async t => {
const expected: string[] = [
'rmRF("/home/scala-steward/workspace/store/refresh_error")',
'rmRF("/home/scala-steward/workspace/repos")',
'rmRF("/home/scala-steward/workspace/run-summary.md")',
'readFileSync("/home/scala-steward/repos.md")',
`saveCache([/home/scala-steward/workspace], "scala-steward-acc000fd-${now}")`,
]
Expand Down
3 changes: 3 additions & 0 deletions src/modules/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export class Workspace {
await this.files.rmRF(path.join(this.workspace.value, 'store', 'refresh_error'))
await this.files.rmRF(path.join(this.workspace.value, 'repos'))

// Don't persist a summary that's specific to this run
await this.files.rmRF(this.runSummary_md)

const hash = this.hashFile(this.repos_md.value)

await this.cache.saveCache([this.workspace.value], `scala-steward-${hash}-${Date.now().toString()}`)
Expand Down

0 comments on commit 916e71f

Please sign in to comment.