make mastodon installation faster in dev mode (#624)

use-travis-to-deploy-prod
Nolan Lawson 2018-11-11 11:12:47 -08:00 zatwierdzone przez GitHub
rodzic 6bb4c80450
commit 00cafece8c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 11 dodań i 3 usunięć

Wyświetl plik

@ -95,9 +95,17 @@ async function runMastodon () {
'yarn --pure-lockfile'
]
for (let cmd of cmds) {
console.log(cmd)
await exec(cmd, { cwd, env })
const installedFile = path.join(mastodonDir, 'installed.txt')
try {
await stat(installedFile)
console.log('Already installed Mastodon')
} catch (e) {
console.log('Installing Mastodon...')
for (let cmd of cmds) {
console.log(cmd)
await exec(cmd, { cwd, env })
}
await writeFile(installedFile, '', 'utf8')
}
const promise = spawn('foreman', ['start'], { cwd, env })
const log = fs.createWriteStream('mastodon.log', { flags: 'a' })