Skip to content

Commit

Permalink
chore: fix patch branch push [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jun 25, 2020
1 parent fa434ac commit e8caada
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"prisma": {
"version": "41f8d9863f1e0f6bfdb24def858e520f99bc2479",
"prismaCommit": "e4205f1367ddc8d609983d2b4b8f05f7fff20bc4"
"prismaCommit": "fa434ac5e73ced08e1758c4e71da67e524411fdc"
},
"devDependencies": {
"@apexearth/copy": "1.4.5",
Expand Down Expand Up @@ -154,4 +154,4 @@
"eslint"
]
}
}
}
11 changes: 7 additions & 4 deletions src/scripts/ci/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ async function pull(dir: string, dry = false): Promise<void> {
await run(dir, `git pull origin ${branch} --no-edit`, dry)
}

async function push(dir: string, dry = false): Promise<void> {
const branch = await getBranch(dir)
async function push(dir: string, dry = false, branch?: string): Promise<void> {
branch = branch ?? (await getBranch(dir))
if (process.env.BUILDKITE) {
if (!process.env.GITHUB_TOKEN) {
throw new Error(`Missing env var GITHUB_TOKEN`)
Expand Down Expand Up @@ -959,10 +959,13 @@ async function publishPackages(
)
} else {
console.log(`\nCommiting changes`)
const message = process.env.UPDATE_STUDIO ? 'Bump Studio' : 'Bump versions'
const message = process.env.UPDATE_STUDIO
? 'Bump Studio'
: 'Bump versions'
await commitChanges(repo, `${message} [skip ci]`, dryRun)
}
await push(repo, dryRun).catch(console.error)
const branch = process.env.PATCH_BRANCH
await push(repo, dryRun, branch).catch(console.error)
} catch (e) {
console.error(e)
console.error(`Ignoring this error, continuing`)
Expand Down

0 comments on commit e8caada

Please sign in to comment.