mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2025-03-04 02:53:27 +08:00
add makefile targets
This commit is contained in:
parent
2703cad2be
commit
ec458fd04a
2 changed files with 16 additions and 3 deletions
|
@ -7,8 +7,7 @@ RUN apt-get update && apt-get install -y upx
|
|||
ARG VERSION=main
|
||||
ARG BUILD="N/A"
|
||||
|
||||
ENV GOPROXY=https://goproxy.io \
|
||||
GO111MODULE=on \
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=0 \
|
||||
GOOS=linux
|
||||
|
||||
|
|
16
Makefile
16
Makefile
|
@ -33,4 +33,18 @@ endif
|
|||
mockgen:
|
||||
ifeq (, $(shell which mockgen))
|
||||
$(shell go install github.com/golang/mock/mockgen@v1.6.0)
|
||||
endif
|
||||
endif
|
||||
|
||||
start-replica:
|
||||
podman run --pull always --rm -it -p 9090:80 -p 9091:3000 adguard/adguardhome
|
||||
|
||||
check_defined = \
|
||||
$(strip $(foreach 1,$1, \
|
||||
$(call __check_defined,$1,$(strip $(value 2)))))
|
||||
__check_defined = \
|
||||
$(if $(value $1),, \
|
||||
$(error Undefined $1$(if $2, ($2))))
|
||||
|
||||
build-image:
|
||||
$(call check_defined, AGH_SYNC_VERSION)
|
||||
podman build --build-arg VERSION=${AGH_SYNC_VERSION} --build-arg BUILD=$(shell date -u +'%Y-%m-%dT%H:%M:%S.%3NZ') -t ghcr.io/bakito/adguardhome-sync:${AGH_SYNC_VERSION} .
|
Loading…
Reference in a new issue