-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad2acc8
commit 41f7621
Showing
5 changed files
with
31 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2025-present, Arana/Kiwi Community. All rights reserved. | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. An additional grant | ||
# of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
|
||
# define hooks source and target path | ||
SET(HOOKS_SOURCE_DIR "${CMAKE_SOURCE_DIR}/etc/script") | ||
set(GIT_HOOKS_DIR "${CMAKE_SOURCE_DIR}/.git/hooks") | ||
|
||
# ensure pre-commit hook is installed | ||
ADD_CUSTOM_TARGET(install_git_hooks | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${GIT_HOOKS_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
${HOOKS_SOURCE_DIR}/precommit.sh | ||
${GIT_HOOKS_DIR}/pre-commit | ||
COMMAND ${CMAKE_COMMAND} -E chmod 755 ${GIT_HOOKS_DIR}/pre-commit | ||
COMMENT "Installing git hooks..." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters