frigate/Makefile

40 lines
1.3 KiB
Makefile
Raw Normal View History

default_target: local
2020-10-08 00:25:54 +03:00
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
2022-10-09 03:32:45 +03:00
VERSION = 0.12.0
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
2020-12-19 15:51:10 +03:00
version:
echo "VERSION=\"$(VERSION)-$(COMMIT_HASH)\"" > frigate/version.py
build_web:
2022-11-14 21:09:36 +03:00
docker buildx build --target web-dist --output web/dist .
2020-12-19 15:51:10 +03:00
nginx_frigate:
2022-11-14 21:09:36 +03:00
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate-nginx:1.0.2.nginx .
2021-05-18 08:52:08 +03:00
local:
2022-11-14 21:09:36 +03:00
docker buildx build --tag frigate:latest .
2020-10-08 00:25:54 +03:00
amd64:
2022-11-14 21:09:36 +03:00
docker buildx build --platform linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
arm64:
2022-11-14 21:09:36 +03:00
docker buildx build --platform linux/arm64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
armv7:
2022-11-14 21:09:36 +03:00
docker buildx build --platform linux/arm/v7 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
build: version amd64 arm64 armv7
2022-11-14 21:09:36 +03:00
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
push: build
2022-11-14 21:09:36 +03:00
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag ghcr.io/blakeblackshear/frigate:${GITHUB_REF_NAME}-$(COMMIT_HASH) .
2021-01-09 20:26:46 +03:00
2022-04-12 16:30:55 +03: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-03-11 07:33:53 +03:00
.PHONY: run_tests