Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 6070f83

Browse files
authored
Merge pull request #45 from netlify/cleanup-after-deploy
Clean up tmp dir after deploys
2 parents 64c68b5 + 2676547 commit 6070f83

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"parallel-transform": "^1.1.0",
5151
"pump": "^3.0.0",
5252
"qs": "^6.5.2",
53+
"rimraf": "^2.6.3",
5354
"tempy": "^0.2.1",
5455
"through2-filter": "^3.0.0",
5556
"through2-map": "^3.0.0",
@@ -76,7 +77,6 @@
7677
"npm-run-all": "^4.1.3",
7778
"nyc": "^13.3.0",
7879
"prettier": "^1.16.4",
79-
"rimraf": "^2.6.3",
8080
"webpack": "^4.29.5",
8181
"webpack-cli": "^3.2.3"
8282
},

src/deploy/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const hashFiles = require('./hash-files')
33
const hashFns = require('./hash-fns')
44
const cleanDeep = require('clean-deep')
55
const tempy = require('tempy')
6+
const promisify = require('util.promisify')
7+
const rimraf = promisify(require('rimraf'))
68
const { waitForDiff } = require('./util')
79

810
const { waitForDeploy, getUploadList, defaultFilter } = require('./util')
@@ -102,6 +104,8 @@ module.exports = async (api, siteId, dir, opts) => {
102104
phase: 'stop'
103105
})
104106

107+
await rimraf(opts.tmpDir)
108+
105109
const deployManifest = {
106110
deployId,
107111
deploy,

0 commit comments

Comments
 (0)