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

* chore: fix mastodon fuubar dependency in travis

* fixup
This commit is contained in:
Nolan Lawson 2019-07-07 22:54:11 -07:00 committed by GitHub
parent 9a9adfb217
commit 9f3c05b121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -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`

View File

@ -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')
}
}