-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 943 Bytes
/
Makefile
File metadata and controls
49 lines (40 loc) · 943 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
39
40
41
42
43
44
45
46
47
48
49
DOCKER_TAG?=$(shell git log --format="%H" -n 1)
DOCKER_PLATFORM?=linux/amd64,linux/arm64
DOCKER_CMD?=docker
DOCKER_BUILDX_BUILD?=$(DOCKER_CMD) buildx build --push --platform $(DOCKER_PLATFORM) -t
fmt:
go fmt ./...
.PHONY: fmt
lint:
golangci-lint run
.PHONY: lint
test:
go test ./...
.PHONY: test
check: fmt lint test
.PHONY: check
snapshot:
UPDATE_SNAPS=true go test ./...
.PHONY: snapshot
build:
go build -o ./build/git-pr ./cmd/git-pr
.PHONY: build
bp-setup:
ifeq ($(DOCKER_CMD),docker)
$(DOCKER_CMD) buildx ls | grep pico || $(DOCKER_CMD) buildx create --name pico
$(DOCKER_CMD) buildx use pico
else
# podman
endif
.PHONY: bp-setup
bp: bp-setup
$(DOCKER_BUILDX_BUILD) ghcr.io/picosh/pico/git-pr:$(DOCKER_TAG) --target release .
ifeq ($(DOCKER_CMD),docker)
# docker
else
podman manifest push ghcr.io/picosh/pico/git-pr:$(DOCKER_TAG)
endif
.PHONY: bp
smol:
curl https://pico.sh/smol.css -o ./static/smol.css
.PHONY: smol