toyohime/ci/validate-gofmt.sh
kare.nuorteva 86974d94cd Use Travis build stages for lint and test builds
- Lint build runs scripts in ci directory.
- Test build runs go test kkn.fi/vanity
- Test build is only run if Lint succeeds
- Run all stages (Lint & Test) with Go 1.9

git-svn-id: file:///srv/svn/repo/toyohime/trunk@73 922d331f-388e-da47-97a9-ad700dc0b8b9
2018-01-11 16:11:42 +00:00

14 lines
251 B
Bash
Executable File

#!/bin/bash
# $pkg is relative path to package
pkg=kkn.fi/vanity
importPath=kkn.fi/vanity
relativePkg="${pkg/$importPath/.}"
output=`gofmt -s -l $relativePkg`
if [ "$output" != "" ]; then
echo "validate-gofmt.sh: error $pkg" 1>&2
exit 1
fi
exit 0