build: staging script should ignore pre-commit hook (#15612)

Currently if the caretaker stages a new release, but does not have the
`git-clang-format` pre-commit hook configured properly (there is some
additional configuration involved), the staging script will fail.

In order to avoid these failures, we just ignore the pre-commit hook when
a commit is created automatically by the release scripts. The release script
only makes changes which conform with the clang-format's/ the project style
guidelines.
This commit is contained in:
Paul Gschwendtner
2019-03-26 20:15:38 +01:00
committed by Jeremy Elbourn
parent 0402d55e94
commit a9c69e5db1
+3 -1
View File
@@ -61,7 +61,9 @@ export class GitClient {
/** Creates a new commit within the current branch with the given commit message. */
createNewCommit(message: string): boolean {
return this._spawnGitProcess(['commit', '-m', message]).status === 0;
// Disable pre-commit hooks when creating a commit. Developers might not have set up
// their Git configuration for the "git-clang-format" pre-commit hook.
return this._spawnGitProcess(['commit', '--no-verify', '-m', message]).status === 0;
}
/** Gets the title of a specified commit reference. */