mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Jeremy Elbourn
parent
0402d55e94
commit
a9c69e5db1
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user