more work on testing
This commit is contained in:
parent
6bcbfdc59e
commit
5196109e0c
|
@ -5,3 +5,4 @@ yarn.lock
|
|||
cypress/screenshots
|
||||
templates/.*
|
||||
assets/*.css
|
||||
/mastodon
|
|
@ -0,0 +1,33 @@
|
|||
const pify = require('pify')
|
||||
const exec = require('child-process-promise').exec;
|
||||
const dir = __dirname
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const exists = pify(fs.exists.bind(fs))
|
||||
const writeFile = pify(fs.writeFile.bind(fs))
|
||||
|
||||
const envFile = `
|
||||
PAPERCLIP_SECRET=foo
|
||||
SECRET_KEY_BASE=bar
|
||||
OTP_SECRET=foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
|
||||
`
|
||||
|
||||
async function main() {
|
||||
let mastodonDir = path.join(dir, '../mastodon')
|
||||
if (!(await exists(mastodonDir))) {
|
||||
await exec(`git clone https://github.com/tootsuite/mastodon "${mastodonDir}"`)
|
||||
await exec(`git checkout v2.2.0`, {cwd: mastodonDir})
|
||||
await writeFile(path.join(dir, '../mastodon/.env'), envFile, 'utf8')
|
||||