Skip to content
Snippets Groups Projects
Select Git revision
  • 531c39fd0e7731bff5e88fa0eab9b4a0eacbefa7
  • main default protected
  • drip-server-timing
  • compress-middleware
  • v2.11.0
  • v2.10.0
  • v2.9.2
  • v2.9.1
  • v2.9.0
  • v2.8.0
  • v2.7.0
  • v2.6.0
  • v2.5.6
  • v2.5.5
  • v2.5.4
  • v2.5.3
  • v2.5.2
  • v2.5.1
  • v2.5.0
  • v2.4.2
  • v2.4.1
  • v2.4.0
  • v2.3.0
  • v2.2.2
24 results

Makefile

Blame
  • Makefile 916 B
    commit := $(shell git rev-parse --short HEAD)
    
    build: dist/go-httpbin
    
    dist/go-httpbin: assets cmd/go-httpbin/*.go httpbin/*.go
    	mkdir -p dist
    	go build -o dist/go-httpbin ./cmd/go-httpbin
    
    assets: httpbin/assets/*
    	go-bindata -o httpbin/assets/assets.go -pkg=assets -prefix=static static
    
    test: assets
    	go test ./...
    
    testcover: assets
    	mkdir -p dist
    	go test -coverprofile=dist/coverage.out github.com/mccutchen/go-httpbin/httpbin
    	go tool cover -html=dist/coverage.out
    
    run: build
    	./dist/go-httpbin
    
    clean:
    	rm -r dist
    
    deps:
    	go get -u github.com/jteeuwen/go-bindata/...
    
    image: assets cmd/go-httpbin/*.go httpbin/*.go
    	mkdir -p /tmp/go-httpbin-docker
    	cp Dockerfile /tmp/go-httpbin-docker
    	GOOS=linux GOARCH=amd64 go build -o /tmp/go-httpbin-docker/go-httpbin ./cmd/go-httpbin
    	docker build -t mccutchen/go-httpbin:$(commit) /tmp/go-httpbin-docker
    
    imagepush: image
    	docker push mccutchen/go-httpbin:$(commit)