-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (28 loc) · 881 Bytes
/
Copy pathMakefile
File metadata and controls
38 lines (28 loc) · 881 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
36
37
38
IMAGE ?= ghcr.io/aortmann/stepshell
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
.PHONY: all ui build test lint fmt run docker clean
all: ui build
ui:
cd web && (npm ci || npm install) && node build.mjs
build:
CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o bin/stepshell ./cmd/stepshell
test:
go test ./...
cd web && ./node_modules/.bin/tsc --noEmit
fmt:
gofmt -w internal cmd
lint:
go vet ./...
gofmt -l internal cmd
# Run locally against your current kube-context, no login (dev only).
# Requires the UI to be built first (make ui).
run:
go run ./cmd/stepshell \
--base-url=http://localhost:8080 \
--auth.mode=none \
--dev.user=$(USER)@local \
--kubeconfig=$(HOME)/.kube/config
docker:
docker build --build-arg VERSION=$(VERSION) -t $(IMAGE):$(VERSION) .
clean:
rm -rf bin web/dist