From 9f3c05b12121145851a1c063369046e3306f858e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 7 Jul 2019 22:54:11 -0700 Subject: [PATCH] chore: fix mastodon fuubar dependency in travis (#1321) * chore: fix mastodon fuubar dependency in travis * fixup --- CONTRIBUTING.md | 2 +- bin/run-mastodon.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c834d84..794bf6da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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` diff --git a/bin/run-mastodon.js b/bin/run-mastodon.js index 9ceeb14f..7fa917ad 100644 --- a/bin/run-mastodon.js +++ b/bin/run-mastodon.js @@ -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') } }