2022-04-24 13:52:12 -05:00
|
|
|
default_target: local
|
2020-10-07 16:25:54 -05:00
|
|
|
|
2021-01-13 12:02:44 -06:00
|
|
|
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
2024-08-06 07:39:58 -05:00
|
|
|
VERSION = 0.15.0
|
2022-11-23 20:00:45 -06:00
|
|
|
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
|
2023-07-23 16:45:29 -05:00
|
|
|
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
|
|
|
|
BOARDS= #Initialized empty
|
|
|
|
|
|
|
|
include docker/*/*.mk
|
|
|
|
|
|
|
|
build-boards: $(BOARDS:%=build-%)
|
|
|
|
|
|
|
|
push-boards: $(BOARDS:%=push-%)
|
2020-12-19 06:51:10 -06:00
|
|
|
|
|
|
|
version:
|
2022-11-20 07:34:12 -06:00
|
|
|
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
|
2022-04-24 13:52:12 -05:00
|
|
|
|
2022-11-20 07:34:12 -06:00
|
|
|
local: version
|
2024-09-17 07:39:44 -05:00
|
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
|
|
--tag frigate:latest \
|
|
|
|
--load
|
2021-05-18 00:52:08 -05:00
|
|
|
|
2022-04-24 13:52:12 -05:00
|
|
|
amd64:
|
2024-09-17 07:39:44 -05:00
|
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
|
|
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
|
|
|
|
--platform linux/amd64
|
2022-04-24 13:52:12 -05:00
|
|
|
|
|
|
|
arm64:
|
2024-09-17 07:39:44 -05:00
|
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
|
|
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
|
|
|
|
--platform linux/arm64
|
2022-04-24 13:52:12 -05:00
|
|
|
|
2023-04-08 10:24:28 -05:00
|
|
|
build: version amd64 arm64
|
2024-09-17 07:39:44 -05:00
|
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
|
|
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
|
|
|
|
--platform linux/arm64/v8,linux/amd64
|
2022-04-24 13:52:12 -05:00
|
|
|
|
2023-07-23 16:45:29 -05:00
|
|
|
push: push-boards
|
2024-09-17 07:39:44 -05:00
|
|
|
docker buildx build --target=frigate --file docker/main/Dockerfile . \
|
|
|
|
--tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) \
|
|
|
|
--platform linux/arm64/v8,linux/amd64 \
|
|
|
|
--push
|
2021-01-09 11:26:46 -06:00
|
|
|
|
2022-12-07 07:47:40 -06:00
|
|
|
run: local
|
2023-04-23 11:35:40 -05:00
|
|
|
docker run --rm --publish=5000:5000 --volume=${PWD}/config:/config frigate:latest
|
2022-12-07 07:47:40 -06:00
|
|
|
|
2022-11-30 16:53:45 -06:00
|
|
|
run_tests: local
|
2024-09-17 07:39:44 -05:00
|
|
|
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest \
|
|
|
|
python3 -u -m unittest
|
|
|
|
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest \
|
|
|
|
python3 -u -m mypy --config-file frigate/mypy.ini frigate
|
2022-01-14 07:31:25 -06:00
|
|
|
|
2022-03-10 22:33:53 -06:00
|
|
|
.PHONY: run_tests
|