chore: cache bundler correctly in CircleCI (#1898)

cache-bundle-again
Nolan Lawson 2020-11-23 16:29:03 -08:00 zatwierdzone przez GitHub
rodzic f2e51bbbfe
commit a124ba9dc8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 6 usunięć

Wyświetl plik

@ -10,8 +10,7 @@ const writeFile = promisify(fs.writeFile)
const dir = __dirname
const GIT_URL = 'https://github.com/tootsuite/mastodon.git'
const GIT_TAG_OR_COMMIT = 'v3.1.3'
const GIT_BRANCH = 'master'
const GIT_TAG = 'v3.1.3'
const mastodonDir = path.join(dir, '../mastodon')
@ -20,9 +19,7 @@ export default async function cloneMastodon () {
await stat(mastodonDir)
} catch (e) {
console.log('Cloning mastodon...')
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_OR_COMMIT}`, { cwd: mastodonDir })
await exec(`git clone --single-branch --branch ${GIT_TAG} ${GIT_URL} "${mastodonDir}"`)
await writeFile(path.join(dir, '../mastodon/.env'), envFile, 'utf8')
}
}

Wyświetl plik

@ -59,7 +59,7 @@ async function runMastodon () {
const cwd = mastodonDir
const cmds = [
'gem install bundler foreman',
'bundle install',
'bundle install --frozen',
'bundle exec rails db:migrate',
'yarn --pure-lockfile'
]