-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 802 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 802 Bytes
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
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
.PHONY: all build test test-js test-e2e lint vet install clean regenerate-all
all: lint vet test build
build:
go build -ldflags "-X github.com/alanmeadows/otto/internal/cli.Version=$(VERSION)" -o bin/otto ./cmd/otto
test:
go test ./... -timeout 120s
test-js:
node --test internal/dashboard/tests/logic.test.js
test-e2e:
./internal/dashboard/tests/e2e.sh
lint:
@which golangci-lint > /dev/null 2>&1 && golangci-lint run || echo "golangci-lint not found, skipping"
vet:
go vet ./...
install: build
@mkdir -p ~/.local/bin
cp bin/otto ~/.local/bin/otto
regenerate-all:
go generate ./...
clean:
rm -rf ./bin/
go clean -cache