2022-04-24 20:52:12 +02:00
|
|
|
default_target: local
|
2020-10-07 23:25:54 +02:00
|
|
|
|
2021-01-13 19:02:44 +01:00
|
|
|
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
2022-10-04 13:28:56 +02:00
|
|
|
VERSION = 0.11.1
|
2022-04-24 20:52:12 +02:00
|
|
|
CURRENT_UID := $(shell id -u)
|
|
|
|
CURRENT_GID := $(shell id -g)
|
2020-12-19 13:51:10 +01:00
|
|
|
|
|
|
|
version:
|
2022-04-24 20:52:12 +02:00
|
|
|
echo "VERSION=\"$(VERSION)-$(COMMIT_HASH)\"" > frigate/version.py
|
|
|
|
|
|
|
|
build_web:
|
|
|
|
docker run --volume ${PWD}/web:/web -w /web --volume /etc/passwd:/etc/passwd:ro --volume /etc/group:/etc/group:ro -u $(CURRENT_UID):$(CURRENT_GID) node:16 /bin/bash -c "npm install && npm run build"
|
2020-12-19 13:51:10 +01:00
|
|
|
|
2021-05-18 08:27:45 +02:00
|
|
|
nginx_frigate:
|
2021-07-13 03:54:12 +02:00
|
|
|
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate-nginx:1.0.2 --file docker/Dockerfile.nginx .
|
2021-05-18 07:52:08 +02:00
|
|
|
|
2022-04-24 20:52:12 +02:00
|
|
|
local:
|
2022-03-11 05:33:53 +01:00
|
|
|
DOCKER_BUILDKIT=1 docker build -t frigate -f docker/Dockerfile .
|
2020-10-07 23:25:54 +02:00
|
|
|
|
2022-04-24 20:52:12 +02:00
|
|
|
amd64:
|
|
|
|
docker buildx build --platform linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
|
|
|
|
|
|
|
arm64:
|
|
|
|
docker buildx build --platform linux/arm64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
|
|
|
|
|
|
|
armv7:
|
|
|
|
docker buildx build --platform linux/arm/v7 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
|
|
|
|
|
|
|
build: version amd64 arm64 armv7
|
|
|
|
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
|
|
|
|
|
|
|
push: build
|
|
|
|
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) --file docker/Dockerfile .
|
2021-01-09 18:26:46 +01:00
|
|
|
|
2022-04-12 15:30:55 +02:00
|
|
|
run_tests: frigate
|
|
|
|
docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
|
|
|
|
docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate
|
2022-01-14 14:31:25 +01:00
|
|
|
|
2022-03-11 05:33:53 +01:00
|
|
|
.PHONY: run_tests
|