mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-04 07:36:29 +00:00
75513575be
* store dependency's in git * since we vendor ... rm tech-depts * aad make target 'vendor' to update vendor folder (manual task)
21 lines
439 B
Bash
21 lines
439 B
Bash
#!/bin/bash
|
|
# ln -s $PWD/pre-commit.sh .git/hooks/pre-commit
|
|
go test *.go
|
|
RESULT=$?
|
|
if [[ $RESULT != 0 ]]; then
|
|
echo "REJECTING COMMIT (test failed with status: $RESULT)"
|
|
exit 1;
|
|
fi
|
|
|
|
go fmt *.go
|
|
for e in $(ls examples); do
|
|
go build examples/$e/*.go
|
|
RESULT=$?
|
|
if [[ $RESULT != 0 ]]; then
|
|
echo "REJECTING COMMIT (Examples failed to compile)"
|
|
exit $RESULT;
|
|
fi
|
|
go fmt examples/$e/*.go
|
|
done
|
|
|
|
exit 0
|