Makefile 586 B

1234567891011121314151617181920212223242526
  1. .PHONY: build doc fmt lint run test vendor_clean vendor_get vendor_update vet
  2. # Prepend our _vendor directory to the system GOPATH
  3. # so that import path resolution will prioritize
  4. # our third party snapshots.
  5. VERSION := $(shell git rev-list --count master)
  6. LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}"
  7. GOFILES := $(shell ls *.go | grep -v /vendor/)
  8. BINARY=./bin/yay
  9. default: build
  10. install:
  11. go install -v ${LDFLAGS} ${GO_FILES}
  12. build:
  13. go build -v -o ${BINARY} ${LDFLAGS} ${GO_FILES}
  14. release:
  15. go build -v -o ${BINARY} ./src/main.go
  16. run: build
  17. ${BINARY}
  18. clean:
  19. go clean