1
0
Fork 0

add commit message flag to skip a build. include core in lab build triggers

This commit is contained in:
Enoch Riese 2023-02-28 12:31:18 -06:00
parent affc6b6c4e
commit 18d998748d
2 changed files with 14 additions and 2 deletions

View file

@ -19,10 +19,16 @@ export const shouldSkipBuild = (siteName, checkFolders = '../shared .') => {
const branch = process.env.VERCEL_GIT_COMMIT_REF
// Always build develop branch
if (branch === 'develop') {
console.log('✅ - develop build - Proceed to build')
console.log('✅ - Develop build - Proceed to build')
process.exit(1)
}
// Do not build commits that have [vercel skip] in the message
if (process.env.VERCEL_GIT_COMMIT_MESSAGE.match('[vercel skip]')) {
console.log('🛑 - Commit message includes [vercel skip] - Do not build')
process.exit(0)
}
// Only build pull requests that made changes to the given site
if (process.env.VERCEL_GIT_PULL_REQUEST_ID) {
try {