This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
2021-04-02 14:03:20 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-04-02 14:06:23 +02:00
|
|
|
# This hook lints the code, and if we're on develop or master, also forces the tests to pass.
|
|
|
|
|
|
|
|
|
|
|
|
branch=`git rev-parse --abbrev-ref HEAD`
|
|
|
|
|
2021-04-02 14:03:20 +02:00
|
|
|
# Just lint the code before committing
|
|
|
|
make lint
|
2021-04-02 14:06:23 +02:00
|
|
|
|
|
|
|
# TODO should we add release branches here as well?
|
|
|
|
if [[ "$branch" =~ ^master|develop$ ]]; then
|
|
|
|
make test
|
|
|
|
fi
|