-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (27 loc) · 844 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# vim:ft=make
#
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.ONESHELL:
GIT_REF := $(shell git rev-parse --short HEAD)
GIT_TAG := $(shell git name-rev --tags --name-only $(GIT_REF))
.PHONY: all
all: ./bin/githubactions-docs.darwin ./bin/githubactions-docs.linux
./bin/githubactions-docs.%: $(shell find ./ -name '*.go')
GOOS=$* go build -o $@ -ldflags "-X github.com/mhristof/githubactions-docs/cmd.version=$(GIT_TAG)+$(GIT_REF)" main.go
.PHONY: fast-test
fast-test: ## Run fast tests
go test ./... -tags fast
.PHONY: test
test: ## Run all tests
go test ./...
.PHONY: clean
clean:
rm -rf bin/githubactions-docs.*
.PHONY: help
help: ## Show this help.
@grep '.*:.*##' Makefile | grep -v grep | sort | sed 's/:.*## /:/g' | column -t -s: