-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 887 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
DOCKER_REGISTRY=ghcr.io/jhu-sheridan-libraries/idc-isle-dc
CONTAINER_NAME=migration-assets
.PHONY: image
image: .make/init .make/image
.make/image:
docker build -t ${DOCKER_REGISTRY}/${CONTAINER_NAME}:$(shell cat .make/init.gitrev).$(shell cat .make/init.date) .
@touch .make/image
.PHONY: init
init: .make/init
.make/init:
$(shell date +%s > .make/init.date)
$(shell git rev-parse --short HEAD > .make/init.gitrev)
@touch .make/init
.PHONY: push
push: .make/init .make/image .make/push
.make/push:
docker push ${DOCKER_REGISTRY}/${CONTAINER_NAME}:$(shell cat .make/init.gitrev).$(shell cat .make/init.date)
.PHONY: clean
clean:
@rm .make/*
.PHONY: help
help:
@echo "Migration file server supported make targets are:"
@echo " image: (default) builds the Docker image used for tests"
@echo " push: pushes the image to the GHCR"
@echo " clean: removes 'make' state"