-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (22 loc) · 940 Bytes
/
Makefile
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
PROJECT := $(shell git config --local remote.origin.url|sed -n 's#.*/\([^.]*\)\.git#\1#p'|sed 's/[A-Z]/\L&/g')
.PHONY: \
build \
test
run:
go run ./cmd/$(PROJECT)/main.go
build:
go build ./...
test:
go test -v -count=1 -race ./...
docker: .
docker buildx build -t ghcr.io/gsh-lan/$(PROJECT):latest . --platform=linux/amd64
docker-arm:
docker buildx build -t ghcr.io/gsh-lan/$(PROJECT):latest . --platform=linux/arm64
dockerx:
docker buildx create --name $(PROJECT)-builder --use --bootstrap
docker buildx build -t ghcr.io/gsh-lan/$(PROJECT):latest --platform=linux/arm64,linux/amd64 .
docker buildx rm $(PROJECT)-builder
dockerx-builder:
docker buildx create --name $(PROJECT)-builder --use --bootstrap
run-pulsar:
docker run --rm --name=pulsar -p 8082:8080 -p 6650:6650 apachepulsar/pulsar:2.9.1 bin/pulsar standalone