lint fixes
This commit is contained in:
parent
a1cc978207
commit
efbf561ca6
3 changed files with 10 additions and 11 deletions
|
@ -20,21 +20,21 @@ if (branch === 'develop') {
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
// Only build pull requests that made changes to lab
|
||||
// Only build pull requests that made changes to dev
|
||||
if (process.env.VERCEL_GIT_PULL_REQUEST_ID) {
|
||||
try {
|
||||
const changes = execSync(
|
||||
`git diff --name-only $(git merge-base develop ${branch}) ${branch} sites/shared/ sites/dev`
|
||||
).toString()
|
||||
if (changes) {
|
||||
console.log('✅ - Lab Pull Request - Proceed to build')
|
||||
console.log('✅ - Dev Pull Request - Proceed to build')
|
||||
process.exit(1)
|
||||
}
|
||||
} catch {
|
||||
// just don't error out
|
||||
}
|
||||
|
||||
console.log('🛑 - Pull Request made no changes to Lab - Do not build')
|
||||
console.log('🛑 - Pull Request made no changes to Dev - Do not build')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import process from 'node:process'
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
const branches = ['develop', 'joost']
|
||||
|
||||
// Do not block production builds
|
||||
if (process.env.VERCEL_ENV === 'production') {
|
||||
console.log('✅ - Production build - Proceed to build')
|
||||
|
@ -22,21 +20,21 @@ if (branch === 'develop') {
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
// Only build pull requests that made changes to lab
|
||||
// Only build pull requests that made changes to org
|
||||
if (process.env.VERCEL_GIT_PULL_REQUEST_ID) {
|
||||
try {
|
||||
const changes = execSync(
|
||||
`git diff --name-only $(git merge-base develop ${branch}) ${branch} sites/shared/ sites/org`
|
||||
).toString()
|
||||
if (changes) {
|
||||
console.log('✅ - Lab Pull Request - Proceed to build')
|
||||
console.log('✅ - Org Pull Request - Proceed to build')
|
||||
process.exit(1)
|
||||
}
|
||||
} catch {
|
||||
// just don't error out
|
||||
}
|
||||
|
||||
console.log('🛑 - Pull Request made no changes to Lab - Do not build')
|
||||
console.log('🛑 - Pull Request made no changes to Org - Do not build')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import process from 'node:process'
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
// For now, never build CMS
|
||||
process.exit(0)
|
||||
|
@ -22,21 +23,21 @@ if (branch === 'develop') {
|
|||
process.exit(1)
|
||||
}
|
||||
|
||||
// Only build pull requests that made changes to lab
|
||||
// Only build pull requests that made changes to sanity
|
||||
if (process.env.VERCEL_GIT_PULL_REQUEST_ID) {
|
||||
try {
|
||||
const changes = execSync(
|
||||
`git diff --name-only $(git merge-base develop ${branch}) ${branch} sites/sanity`
|
||||
).toString()
|
||||
if (changes) {
|
||||
console.log('✅ - Lab Pull Request - Proceed to build')
|
||||
console.log('✅ - Sanity Pull Request - Proceed to build')
|
||||
process.exit(1)
|
||||
}
|
||||
} catch {
|
||||
// just don't error out
|
||||
}
|
||||
|
||||
console.log('🛑 - Pull Request made no changes to Lab - Do not build')
|
||||
console.log('🛑 - Pull Request made no changes to Sanity - Do not build')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue