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

Clean up tmp dir after deploys #45

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"parallel-transform": "^1.1.0",
"pump": "^3.0.0",
"qs": "^6.5.2",
"rimraf": "^2.6.3",
"tempy": "^0.2.1",
"through2-filter": "^3.0.0",
"through2-map": "^3.0.0",
Expand All @@ -76,7 +77,6 @@
"npm-run-all": "^4.1.3",
"nyc": "^13.3.0",
"prettier": "^1.16.4",
"rimraf": "^2.6.3",
"webpack": "^4.29.5",
"webpack-cli": "^3.2.3"
},
Expand Down
4 changes: 4 additions & 0 deletions src/deploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const hashFiles = require('./hash-files')
const hashFns = require('./hash-fns')
const cleanDeep = require('clean-deep')
const tempy = require('tempy')
const promisify = require('util.promisify')
const rimraf = promisify(require('rimraf'))
const { waitForDiff } = require('./util')

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

await rimraf(opts.tmpDir)

const deployManifest = {
deployId,
deploy,
Expand Down