-
-
Notifications
You must be signed in to change notification settings - Fork 370
/
Copy pathMakefile
40 lines (32 loc) · 1.54 KB
/
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
31
32
33
34
35
36
37
38
39
40
#TODO use this as a version
GIT_HASH := $(shell git rev-parse --short HEAD)
LATEST_TAG := $(shell git describe --tags --abbrev=0)
CURRENT_TIMESTAMP := $(shell date +%s)
# used for local testing, so i can save the platform build time
PHONY: build-containers
build-containers:
(cd ./metrics/ && docker buildx build --build-arg="VERSION=$(CURRENT_TIMESTAMP)" . -t nilsherzig/lsm:latest --load)
docker buildx build --build-arg="PUBLIC_VERSION=$(CURRENT_TIMESTAMP)" . -t nilsherzig/llocalsearch-frontend:latest --load
(cd ./backend/ && docker buildx build . -t nilsherzig/llocalsearch-backend:latest --load)
# containers which will be published
PHONY: build-containers-multi
build-containers-multi:
(cd ./metrics/ && docker buildx build --build-arg="VERSION=$(CURRENT_TIMESTAMP)" . -t nilsherzig/lsm:latest --push --platform linux/amd64,linux/arm64)
docker buildx build --build-arg="PUBLIC_VERSION=$(CURRENT_TIMESTAMP)" . -t nilsherzig/llocalsearch-frontend:latest --push --platform linux/amd64,linux/arm64
(cd ./backend/ && docker buildx build . -t nilsherzig/llocalsearch-backend:latest --push --platform linux/amd64,linux/arm64)
PHONY: new-release
new-release: build-containers-multi
@echo "New release pushed to Docker Hub"
PHONY: e2e-backend
e2e-backend:
(cd ./backend && ginkgo -v -r ./...)
# dev run commands
PHONY: build-dev
build-dev:
docker-compose -f ./docker-compose.dev.yaml build
PHONY: dev
dev: build-dev
docker-compose -f ./docker-compose.dev.yaml up $(ARGS)
PHONY: dev-bg
dev-bg: build-dev
docker-compose -f ./docker-compose.dev.yaml up -d