aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/danger/clean/cleaner.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-05 10:50:20 +0200
committerChocobozzz <me@florianbigard.com>2021-05-05 10:51:32 +0200
commita0e69167ae43ffbe088b2e9e436bf2624a4a1b4e (patch)
tree81f0e61560b4991e16141a4dc7359dbb99f12750 /scripts/danger/clean/cleaner.ts
parent36d9a79f7be85406489491670bda5284fa897d02 (diff)
downloadPeerTube-a0e69167ae43ffbe088b2e9e436bf2624a4a1b4e.tar.gz
PeerTube-a0e69167ae43ffbe088b2e9e436bf2624a4a1b4e.tar.zst
PeerTube-a0e69167ae43ffbe088b2e9e436bf2624a4a1b4e.zip
Remove scripty
It breaks our tests with the latest npm release
Diffstat (limited to 'scripts/danger/clean/cleaner.ts')
-rw-r--r--scripts/danger/clean/cleaner.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/scripts/danger/clean/cleaner.ts b/scripts/danger/clean/cleaner.ts
deleted file mode 100644
index 69e8a63a0..000000000
--- a/scripts/danger/clean/cleaner.ts
+++ /dev/null
@@ -1,34 +0,0 @@
1import { registerTSPaths } from '../../../server/helpers/register-ts-paths'
2registerTSPaths()
3
4import * as Promise from 'bluebird'
5import * as rimraf from 'rimraf'
6import { initDatabaseModels, sequelizeTypescript } from '../../../server/initializers/database'
7import { CONFIG } from '../../../server/initializers/config'
8
9initDatabaseModels(true)
10 .then(() => {
11 return sequelizeTypescript.drop()
12 })
13 .then(() => {
14 console.info('Tables of %s deleted.', CONFIG.DATABASE.DBNAME)
15
16 const STORAGE = CONFIG.STORAGE
17 return Promise.mapSeries(Object.keys(STORAGE), storage => {
18 const storageDir = STORAGE[storage]
19
20 return new Promise((res, rej) => {
21 rimraf(storageDir, err => {
22 if (err) return rej(err)
23
24 console.info('%s deleted.', storageDir)
25 return res()
26 })
27 })
28 })
29 .then(() => process.exit(0))
30 })
31 .catch(err => {
32 console.error(err)
33 process.exit(-1)
34 })