aboutsummaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/pre-commit5
1 files changed, 5 insertions, 0 deletions
diff --git a/hooks/pre-commit b/hooks/pre-commit
new file mode 100755
index 0000000..f4522e4
--- /dev/null
+++ b/hooks/pre-commit
@@ -0,0 +1,5 @@
+printf "[pre-commit hook] Updating branch reference in Jenkinsfile.test to allow self-testing... "
+branch=$(git rev-parse --abbrev-ref HEAD)
+sed -i "s/utils@.*'/utils@${branch}'/" Jenkinsfile
+git update-index --add Jenkinsfile
+printf "done.\n"