chore: fix mastodon fuubar dependency in travis (#1321)

* chore: fix mastodon fuubar dependency in travis

* fixup
quarantine-run
Nolan Lawson 2019-07-07 22:54:11 -07:00 zatwierdzone przez GitHub
rodzic 9a9adfb217
commit 9f3c05b121
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -120,7 +120,7 @@ or
1. Run `rm -fr mastodon` to clear out all Mastodon data
1. Comment out `await restoreMastodonData()` in `run-mastodon.js` to avoid actually populating the database with statuses/favorites/etc.
2. Update the `GIT_TAG` in `run-mastodon.js` to whatever you want
2. Update the `GIT_TAG_OR_BRANCH` in `run-mastodon.js` to whatever you want
3. Run `yarn run run-mastodon`
4. Run `yarn run backup-mastodon-data` to overwrite the data in `fixtures/`
5. Uncomment `await restoreMastodonData()` in `run-mastodon.js`

Wyświetl plik

@ -13,8 +13,9 @@ const stat = promisify(fs.stat)
const writeFile = promisify(fs.writeFile)
const dir = __dirname
const GIT_URL = 'https://github.com/tootsuite/mastodon.git'
const GIT_TAG = 'v2.9.2'
const GIT_URL = 'https://github.com/nolanlawson/mastodon.git'
const GIT_TAG_OR_COMMIT = '824ddcdbe'
const GIT_BRANCH = 'v2.9.2-with-fuubar-fix'
const DB_NAME = 'pinafore_development'
const DB_USER = 'pinafore'
@ -42,9 +43,9 @@ async function cloneMastodon () {
await stat(mastodonDir)
} catch (e) {
console.log('Cloning mastodon...')
await exec(`git clone --single-branch --branch master ${GIT_URL} "${mastodonDir}"`)
await exec(`git clone --single-branch --branch ${GIT_BRANCH} ${GIT_URL} "${mastodonDir}"`)
await exec(`git fetch origin --tags`, { cwd: mastodonDir }) // may already be cloned, e.g. in CI
await exec(`git checkout ${GIT_TAG}`, { cwd: mastodonDir })
await exec(`git checkout ${GIT_TAG_OR_COMMIT}`, { cwd: mastodonDir })
await writeFile(path.join(dir, '../mastodon/.env'), envFile, 'utf8')
}
}