Skip to content

Commit

Permalink
ci: UPDATE_STUDIO should commit changes - https & hide [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 committed Apr 29, 2020
1 parent 2ecd2b9 commit f8da7cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/scripts/ci/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,15 @@ async function run(
cwd: string,
cmd: string,
dry: boolean = false,
hidden: boolean = false,
): Promise<void> {
const args = [chalk.underline('./' + cwd).padEnd(20), chalk.bold(cmd)]
if (dry) {
args.push(chalk.dim('(dry)'))
}
console.log(...args)
if (!hidden) {
console.log(...args)
}
if (dry) {
return
}
Expand Down Expand Up @@ -555,6 +558,7 @@ async function tagEnginesRepo(dryRun = false) {
'prisma-engines',
`git remote add origin-push https://${process.env.GITHUB_TOKEN}@github.com/prisma/prisma-engines.git`,
dryRun,
true,
)
}
await run(
Expand Down Expand Up @@ -763,6 +767,12 @@ async function publishPackages(
await run('.', `git config --global user.email "prismabots@gmail.com"`)
await run('.', `git config --global user.name "prisma-bot"`)
await run('.', `git checkout master`, dryRun)
await run(
'.',
`git remote set-url origin https://${process.env.GITHUB_TOKEN}@github.com/prisma/prisma.git`,
dryRun,
true,
)
}

// for now only push when studio is being updated
Expand Down

0 comments on commit f8da7cb

Please sign in to comment.