Makefile 688 B

1234567891011121314151617181920212223242526
  1. .PHONY: build format test install coverage coverage-html
  2. YOSAICTL = yosaictl
  3. YOSAID = yosaid
  4. build:
  5. go build -o ./build/linux/$(YOSAICTL)/$(YOSAICTL) ./cmd/$(YOSAICTL)/$(YOSAICTL).go && \
  6. go build -o ./build/linux/$(YOSAID)/$(YOSAID) ./cmd/$(YOSAID)/$(YOSAID).go
  7. format:
  8. go fmt ./...
  9. install:
  10. sudo mv ./build/linux/$(YOSAICTL)/$(YOSAICTL) /usr/local/bin && sudo chmod u+x /usr/local/bin/$(YOSAICTL) && \
  11. sudo mv ./build/linux/$(YOSAID)/$(YOSAID) /usr/local/bin && sudo chmod u+x /usr/local/bin/$(YOSAID)
  12. test:
  13. go test -v ./...
  14. coverage:
  15. go test -v ./... -cover
  16. coverage-html:
  17. go test -v ./... -coverprofile=coverage.out
  18. go tool cover -html=coverage.out -o coverage.html