Makefile 553 B

12345678910111213141516171819202122232425262728293031
  1. export PATH := ./bin:$(PATH)
  2. export GO111MODULE := on
  3. # Install all the build and lint dependencies
  4. setup:
  5. curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh
  6. go mod download
  7. .PHONY: setup
  8. # Build all files.
  9. build:
  10. @echo "==> Building"
  11. @go build -o bin/giter
  12. .PHONY: build
  13. # Run all the linters
  14. lint:
  15. @./bin/golangci-lint run
  16. .PHONY: lint
  17. # Release binaries to GitHub.
  18. release: build
  19. @echo "==> Releasing"
  20. @goreleaser --rm-dist
  21. @echo "==> Complete"
  22. .PHONY: release
  23. # Clean.
  24. clean:
  25. @rm -rf dist
  26. .PHONY: clean