Skip to content

Commit

Permalink
chore: fix ci [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jul 13, 2020
1 parent bb7c312 commit 794a435
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/scripts/ci/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,9 @@ async function publishPackages(
}
}

if (process.env.UPDATE_STUDIO) {
if (process.env.UPDATE_STUDIO || process.env.PATCH_BRANCH) {
await run('.', `git config --global user.email "prismabots@gmail.com"`)
await run('.', `git config --global user.name "prisma-bot"`)
await run('.', `git stash`, dryRun)
await run('.', `git checkout master`, dryRun)
await run('.', `git stash pop`, dryRun)
await run(
'.',
`git remote set-url origin https://${process.env.GITHUB_TOKEN}@github.com/prisma/prisma.git`,
Expand All @@ -938,6 +935,12 @@ async function publishPackages(
)
}

if (process.env.UPDATE_STUDIO) {
await run('.', `git stash`, dryRun)
await run('.', `git checkout master`, dryRun)
await run('.', `git stash pop`, dryRun)
}

// for now only push when studio is being updated
if (
!process.env.BUILDKITE ||
Expand Down

0 comments on commit 794a435

Please sign in to comment.