Skip to content

Commit

Permalink
chore: fix get branch in ignore script
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Aug 13, 2024
1 parent f3a011d commit d512cb0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/ignore-build.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// @ts-check

import { execSync } from 'node:child_process'
import process from 'node:process'

const gitLog = execSync('git log -1 --pretty=%B', { encoding: 'utf8' }).trim()
const gitBranch = execSync('git branch --show-current', {
encoding: 'utf8',
}).trim()
const gitLog = process.env.VERCEL_GIT_COMMIT_MESSAGE || ''
const gitBranch = process.env.VERCEL_GIT_COMMIT_REF

if (gitLog.startsWith('chore: release') && gitBranch !== 'release') {
console.log('Release commit, skipped.')
Expand Down

0 comments on commit d512cb0

Please sign in to comment.