github.com/aleksi/gonuts.io@v0.0.0-20130622121132-3b0f2d1999fb/Makefile (about)

     1  GOPATH:=$(shell pwd)/gopath
     2  SDKROOT:=/usr/local/Cellar/go-app-engine-64/1.8.1/share/go-app-engine-64
     3  
     4  GOFILES:=$(shell cd app && find . -name *.go)
     5  
     6  all: fvb
     7  
     8  prepare:
     9  	rm -fr $(GOPATH)
    10  	mkdir -p $(GOPATH)/src
    11  	go get -u github.com/bmizerany/pat
    12  	rm -fr $(GOPATH)/src/github.com/bmizerany/pat/.git
    13  	rm -fr $(GOPATH)/src/github.com/bmizerany/pat/example
    14  	go get -u github.com/mjibson/appstats
    15  	rm -fr $(GOPATH)/src/github.com/mjibson/appstats/.git
    16  	rm -fr $(GOPATH)/src/code.google.com
    17  	nut get -v aleksi/nut
    18  
    19  # format, vet, build
    20  fvb:
    21  	gofmt -e -s -w .
    22  	go tool vet .
    23  	cd app && $(SDKROOT)/goroot/bin/go-app-builder -goroot=$(SDKROOT)/goroot -dynamic -unsafe $(GOFILES)
    24  
    25  run: fvb
    26  	$(SDKROOT)/dev_appserver.py --skip_sdk_update_check=yes app
    27  
    28  run_clean: fvb
    29  	$(SDKROOT)/dev_appserver.py --skip_sdk_update_check=yes --clear_datastore=yes app
    30  
    31  check_clean:
    32  	git diff-index --exit-code HEAD
    33  	u="$$(git ls-files --others --exclude-standard)" && echo $$u && test -z "$$u"
    34  
    35  deploy: fvb check_clean
    36  	$(SDKROOT)/appcfg.py --oauth2 update app