Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (37 sloc) 713 Bytes
all: update test
update:
rm -f ca-certificates.crt
docker run -v $(shell pwd):/out golang:1.5.1 cp /etc/ssl/certs/ca-certificates.crt /out/ca-certificates.crt
rm -f var.go
echo 'package cacerts' >> var.go
echo >> var.go
echo 'var pemCerts = []byte(`' >> var.go
cat ca-certificates.crt >> var.go
rm -f ca-certificates.crt
echo '`)' >> var.go
gofmt -w var.go
build:
go build ./...
lint:
go get -v github.com/golang/lint/golint
golint ./...
vet:
go vet ./...
errcheck:
go get -v github.com/kisielk/errcheck
errcheck ./...
pretest: lint vet errcheck
test: pretest
go test ./...
clean:
go clean ./...
.PHONY: \
all \
update \
build \
lint \
vet \
errcheck \
pretest \
test \
clean