File: post-commit

package info (click to toggle)
mumax3 3.11.1-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 10,668 kB
  • sloc: makefile: 194; ansic: 155; sh: 86; javascript: 16
file content (21 lines) | stat: -rwxr-xr-x 533 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#
# A hook script to verify what is about to be committed.
# Called by git-commit with no arguments.  The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# 
# Add this file to .git/hooks

# Run all unit tests
echo Running unit tests in background
rm test.log -rf
(if (make test >> test.log 2>> test.log); then
	notify-send "Unit tests passed" 2> /dev/null
	exit 0;
else
	notify-send "Unit tests failed" 2> /dev/null
	cat test.log;
	rm test.log;
	exit 2;
fi;)&