Skip to content

Commit d0b9589

Browse files
committed
cleanup Makefile
1 parent 6476e79 commit d0b9589

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

Makefile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
SRCS := $(filter-out %_test.go, $(wildcard *.go cmd/actionlint/*.go)) go.mod go.sum
22
TESTS := $(filter %_test.go, $(wildcard *.go))
3-
TOOL := $(wildcard scripts/*/*.go)
4-
TESTDATA := $(wildcard testdata/examples/* testdata/err/* testdata/ok/*)
5-
GOTEST := $(shell command -v gotest 2>/dev/null)
3+
TOOL := $(filter %_test.go, $(wildcard scripts/*/*.go))
4+
TESTDATA := $(wildcard \
5+
testdata/examples/* \
6+
testdata/err/* \
7+
testdata/ok/* \
8+
testdata/config/* \
9+
testdata/format/* \
10+
testdata/projects/* \
11+
testdata/reusable_workflow_metadata/* \
12+
)
613

714
all: clean build test
815

916
.testtimestamp: $(TESTS) $(SRCS) $(TESTDATA) $(TOOL)
1017
go test ./...
1118
touch .testtimestamp
1219

13-
test: .testtimestamp
20+
t test: .testtimestamp
1421

1522
.staticchecktimestamp: $(TESTS) $(SRCS) $(TOOL)
1623
staticcheck ./...
1724
GOOS=js GOARCH=wasm staticcheck ./playground
1825
touch .staticchecktimestamp
1926

20-
lint: .staticchecktimestamp
27+
l lint: .staticchecktimestamp
2128

2229
popular_actions.go all_webhooks.go availability.go: scripts/generate-popular-actions/main.go scripts/generate-webhook-events/main.go scripts/generate-availability/main.go
2330
ifdef SKIP_GO_GENERATE
@@ -29,7 +36,7 @@ endif
2936
actionlint: $(SRCS) popular_actions.go all_webhooks.go
3037
CGO_ENABLED=0 go build ./cmd/actionlint
3138

32-
build: actionlint
39+
b build: actionlint
3340

3441
actionlint_fuzz-fuzz.zip:
3542
go-fuzz-build ./fuzz
@@ -55,13 +62,8 @@ scripts/generate-actionlint-matcher/test/no_escape.txt: actionlint
5562
scripts/generate-actionlint-matcher/test/want.json: actionlint
5663
./actionlint -format '{{json .}}' ./testdata/err/one_error.yaml > scripts/generate-actionlint-matcher/test/want.json || true
5764

58-
clean:
65+
c clean:
5966
rm -f ./actionlint ./.testtimestamp ./.staticchecktimestamp ./actionlint_fuzz-fuzz.zip ./man/actionlint.1 ./man/actionlint.1.html ./actionlint-workflow-ast
6067
rm -rf ./corpus ./crashers
6168

62-
b: build
63-
t: test
64-
c: clean
65-
l: lint
66-
6769
.PHONY: all test clean build lint fuzz man bench b t c l

0 commit comments

Comments
 (0)