-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
46 lines (35 loc) · 935 Bytes
/
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
41
42
43
44
45
46
SHELL := bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
.RECIPEPREFIX +=
.PHONY: all build clean images upload-dev
DIR := $(shell basename "$(shell pwd)")
NAME = mkcmd
DOCKERFILE = ./Dockerfile
ifndef SSH_PRIVATE_KEY
override SSH_PRIVATE_KEY=${HOME}/.ssh/id_ed25519
endif
ifndef SSH_PUBLIC_KEY
override SSH_PUBLIC_KEY=${HOME}/.ssh/id_ed25519.pub
endif
all: build
echo all
build:
docker build -f $(DOCKERFILE) -t $(NAME) .
clean:
rm -rf dat
images: clean
mkdir -p dat
mkadm -n core --export-dump dat/miki-core.pg
mkadm -n base -e [email protected]
mkadm -Tn base --snapshot-tarball dat/miki-base.tar.xz
mkadm -Xn base
upload-dev:
rsync -avzP mkadm control:src/mkadm/mkadm-dev
ssh control chmod +x src/mkadm/mkadm-dev
upload-prod:
rsync -avzP mkadm control:src/mkadm/mkadm
ssh control chmod +x src/mkadm/mkadm