aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/danger/clean/cleaner.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-11 15:19:43 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-11 15:19:43 +0200
commit1840c2f7c91f5f89602a3683d85b0a9df1454855 (patch)
tree7efc223222e2d318abfaef0839a79e23be727cea /scripts/danger/clean/cleaner.js
parent8635a2c70cc24a4c52558162ac058de95750271f (diff)
downloadPeerTube-1840c2f7c91f5f89602a3683d85b0a9df1454855.tar.gz
PeerTube-1840c2f7c91f5f89602a3683d85b0a9df1454855.tar.zst
PeerTube-1840c2f7c91f5f89602a3683d85b0a9df1454855.zip
Update webpack stack
Diffstat (limited to 'scripts/danger/clean/cleaner.js')
-rw-r--r--scripts/danger/clean/cleaner.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/scripts/danger/clean/cleaner.js b/scripts/danger/clean/cleaner.js
deleted file mode 100644
index 1a1e3dee7..000000000
--- a/scripts/danger/clean/cleaner.js
+++ /dev/null
@@ -1,25 +0,0 @@
1const eachSeries = require('async/eachSeries')
2const rimraf = require('rimraf')
3
4const constants = require('../../../server/initializers/constants')
5const db = require('../../../server/initializers/database')
6
7db.init(true, function () {
8 db.sequelize.drop().asCallback(function (err) {
9 if (err) throw err
10
11 console.info('Tables of %s deleted.', db.sequelize.config.database)
12
13 const STORAGE = constants.CONFIG.STORAGE
14 eachSeries(Object.keys(STORAGE), function (storage, callbackEach) {
15 const storageDir = STORAGE[storage]
16
17 rimraf(storageDir, function (err) {
18 console.info('%s deleted.', storageDir)
19 return callbackEach(err)
20 })
21 }, function () {
22 process.exit(0)
23 })
24 })
25})