1
0
Fork 0

chore(org): Set list of preview branches

This commit is contained in:
Joost De Cock 2022-12-26 14:38:55 +01:00
parent f3c6e494d4
commit dbad12b67f

View file

@ -1,5 +1,7 @@
import process from 'node:process'
const branches = ['develop', 'joost']
// Do not block production builds
if (process.env.VERCEL_ENV === 'production') {
console.log('✅ - Production build - Proceed to build')
@ -13,8 +15,8 @@ if (process.env.VERCEL_GIT_COMMIT_AUTHOR_LOGIN === 'dependabot[bot]') {
}
// Do not build anything that is not the develop branch
if (process.env.VERCEL_GIT_COMMIT_REF === 'develop') {
console.log('✅ - develop build - Proceed to build')
if (branches.includes(process.env.VERCEL_GIT_COMMIT_REF)) {
console.log('✅ - elected branch build - Proceed to build')
process.exit(1)
}