MCPcopy Create free account
hub / github.com/formkit/formkit / checkGitIsMasterBranch

Function checkGitIsMasterBranch

scripts/utils.mjs:355–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

353 * Returns true if the current git branch is master
354 */
355export function checkGitIsMasterBranch() {
356 const branch = execSync(`git rev-parse --abbrev-ref HEAD`, {
357 encoding: 'utf-8',
358 }).toString()
359 return branch.trim() === 'master'
360}
361
362/**
363 * Returns the first n characters of the current git commit hash.

Callers 2

publishPackagesFunction · 0.90
publishPackagesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected