mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-10-06 17:53:44 +00:00
Move AStyleHelper to the .github folder
This commit is contained in:
parent
382f4b227d
commit
625b28823a
@ -1,4 +1,4 @@
|
||||
@echo off
|
||||
echo Run this to install the auto-format hook.
|
||||
git config core.autocrlf false
|
||||
copy hooks\pre-commit .git\hooks\pre-commit
|
||||
copy %~dp0pre-commit %~dp0..\..\.git\hooks\pre-commit
|
6
hooks/pre-commit → .github/format/pre-commit
vendored
6
hooks/pre-commit → .github/format/pre-commit
vendored
@ -4,13 +4,13 @@
|
||||
#
|
||||
|
||||
#check if the formatter is present
|
||||
if [ ! -f ./hooks/AStyleHelper.exe ]; then
|
||||
if [ ! -f ./.github/format/AStyleHelper.exe ]; then
|
||||
echo "AStyleHelper not found!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#format the code
|
||||
"./hooks/AStyleHelper.exe" Silent
|
||||
"./.github/format/AStyleHelper.exe" Silent
|
||||
|
||||
#exit when nothing needs to be done
|
||||
if [ $? == 0 ]; then
|
||||
@ -28,6 +28,6 @@ fi
|
||||
#cancel commit if the changes were undone by the formatting
|
||||
gitFiles=$(git diff-index --name-only --cached HEAD)
|
||||
if [ -z "$gitFiles" ]; then
|
||||
"./hooks/AStyleHelper.exe" "After formatting, no files were staged..."
|
||||
"./.github/AStyleHelper.exe" "After formatting, no files were staged..."
|
||||
exit 1
|
||||
fi
|
@ -1,2 +1,3 @@
|
||||
@echo off
|
||||
hooks\AStyleHelper.exe Silent
|
||||
git config core.autocrlf false
|
||||
%~dp0.github\format\AStyleHelper.exe Silent
|
||||
|
Loading…
Reference in New Issue
Block a user