File: Makefile

package info (click to toggle)
golang-github-urfave-cli-v2 2.25.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,188 kB
  • sloc: makefile: 41; sh: 28
file content (29 lines) | stat: -rw-r--r-- 641 bytes parent folder | download
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
GOIMPORTS_BIN ?= $(shell which goimports || true)
GOTEST_FLAGS ?= -v --coverprofile main.coverprofile --covermode count --cover github.com/urfave/cli/v2/cmd/urfave-cli-genflags
GOBUILD_FLAGS ?= -x

export GOIMPORTS_BIN

.PHONY: all
all: test build smoke-test

.PHONY: test
test:
	go test $(GOTEST_FLAGS) ./...

.PHONY: build
build:
	go build $(GOBUILD_FLAGS) ./...

.PHONY: smoke-test
smoke-test: build
	./urfave-cli-genflags --help

.PHONY: show-cover
show-cover:
	go tool cover -func main.coverprofile

.PHONY: run
run: build
	./urfave-cli-genflags	
	./urfave-cli-genflags -f altsrc/flag-spec.yaml -o altsrc/flag_generated.go -p altsrc -a