-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (33 loc) · 1.07 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
.DEFAULT_GOAL = help
SHELL = /usr/bin/env bash
include .env
export
.PHONY: build
build:
@docker compose build --quiet
.PHONY: version # Get the version of DNSControl
version: build
@docker compose run --rm dnscontrol version
.PHONY: check # Check and validate dnsconfig.js
check: build
@docker compose run --rm dnscontrol check
.PHONY: check-creds # Do a small operation to verify credentials
check-creds: build
ifndef DNSCONTROL_LOCAL_CREDS
$(error DNSCONTROL_LOCAL_CREDS is undefined)
endif
ifndef CRED_KEY
$(error CRED_KEY is undefined)
endif
@docker compose run --rm dnscontrol check-creds --creds $(DNSCONTROL_LOCAL_CREDS) $(CRED_KEY)
.PHONY: preview # Read live configuration and identify changes to be made, without applying them
preview: build
ifndef DNSCONTROL_LOCAL_CREDS
$(error DNSCONTROL_LOCAL_CREDS is undefined)
endif
@docker compose run --rm dnscontrol preview --creds $(DNSCONTROL_LOCAL_CREDS)
.PHONY: help # List available commands
help:
@echo "Available commands:"
@echo
@grep '^.PHONY: .* #' Makefile | sed 's/\.PHONY: \(.*\) # \(.*\)/\1 >> \2/' | expand -t20