After this commit, dev auth would start working with the `REMARK_URL` hostname instead of the previously hardcoded 127.0.0.1. Breaks development setup where `REMARK_URL` was set to a non-standard value and dev auth was running on 127.0.0.1 and working, as, after that change, it would stop working.
19 lines
523 B
Bash
19 lines
523 B
Bash
#!/bin/bash -eu
|
|
|
|
# TODO: Only colorize messages given a suitable terminal.
|
|
# FIXME: Handle case in which no stash entry is created due to no changes.
|
|
|
|
printf "\e[30m=== PRE-COMMIT STARTING ===\e[m\n"
|
|
git stash save --quiet --keep-index --include-untracked
|
|
|
|
if go build -v ./... && go test -v -cover ./... && go vet ./... && golint . && travis-lint; then
|
|
result=$?
|
|
printf "\e[32m=== PRE-COMMIT SUCCEEDED ===\e[m\n"
|
|
else
|
|
result=$?
|
|
printf "\e[31m=== PRE-COMMIT FAILED ===\e[m\n"
|
|
fi
|
|
|
|
git stash pop --quiet
|
|
exit $result
|