File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22#
33# An example hook script to verify what is about to be committed.
44# Called by "git commit" with no arguments. The hook should
1818# If you want to allow non-ASCII filenames set this variable to true.
1919allownonascii=$( git config --type=bool hooks.allownonascii)
2020
21- # Redirect output to stderr.
22- exec 1>&2
21+ set -eo pipefail
2322
2423# Cross platform projects tend to avoid non-ASCII filenames; prevent
2524# them from being added to the repository. We exploit the fact that the
4746
4847# If there are whitespace errors, print the offending file names and fail.
4948git diff-index --check --cached $against
50- if [ " $? " -ne 0 ]
51- then
52- exit " $? "
53- fi
5449
5550# Configure and run the tests/examples
56- cmake -B build
57- if [ " $? " -ne 0 ]
58- then
59- exit " $? "
60- fi
51+ cmake -B .build-githook
6152
53+ # Create the package
54+ cmake --build .build-githook --target package
Original file line number Diff line number Diff line change 11build
2+ .build-githook
You can’t perform that action at this time.
0 commit comments