~chipaca/snappy/snappy-tar-pack-mknod

« back to all changes in this revision

Viewing changes to .tarmac.sh

  • Committer: Michael Vogt
  • Date: 2015-02-13 13:29:27 UTC
  • mfrom: (171 snappy)
  • mto: This revision was merged to the branch mainline in revision 172.
  • Revision ID: michael.vogt@ubuntu.com-20150213132927-5eyg71l1yysvw6ul
mergedĀ lp:snappy

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
set -ev
4
4
 
 
5
# we always run in a fresh dir in tarmac
5
6
export GOPATH=$(mktemp -d)
6
7
trap 'rm -rf "$GOPATH"' EXIT
7
8
 
8
 
echo Checking formatting
9
 
fmt=$(gofmt -l .)
10
 
 
11
 
if [ -n "$fmt" ]; then
12
 
    echo "Formatting wrong in following files"
13
 
    echo $fmt
14
 
    exit 1
15
 
fi
16
 
 
17
 
echo Installing godeps
18
 
go get launchpad.net/godeps
19
 
echo Install golint
20
 
go get github.com/golang/lint/golint
21
 
export PATH=$PATH:$GOPATH/bin
22
 
 
23
 
echo Obtaining dependencies
24
 
godeps -u dependencies.tsv
25
 
 
26
9
# this is a hack, but not sure tarmac is golang friendly
27
 
mkdir $GOPATH/src/launchpad.net/snappy
28
 
 
29
 
cp -r . $GOPATH/src/launchpad.net/snappy/
 
10
mkdir -p $GOPATH/src/launchpad.net/snappy
 
11
cp -a . $GOPATH/src/launchpad.net/snappy/
30
12
cd $GOPATH/src/launchpad.net/snappy
31
13
 
32
 
echo Building
33
 
go build -v launchpad.net/snappy/...
34
 
 
35
 
echo Running tests from $(pwd)
36
 
go test ./...
37
 
 
38
 
echo Running lint
39
 
# FIXME: get rid of the "grep" below
40
 
lint=$(golint ./...|grep -v "should have comment or be unexported")
41
 
if [ -n "$lint" ]; then
42
 
    echo "Lint complains:"
43
 
    echo $lint
44
 
    exit 1
45
 
fi
46
 
 
 
14
./run-checks