-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
38 lines (32 loc) · 1.35 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
BUILD_TAG ?= latest
run:
docker-compose down --remove-orphans && \
GIT_TAG=$(shell git describe --tags --abbrev=0 HEAD) \
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
GIT_REVISION=$(shell git rev-parse --short HEAD) \
docker-compose up --build
run-dev:
REACT_APP_GIT_TAG=$(shell git describe --tags --abbrev=0 HEAD) \
REACT_APP_GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
REACT_APP_GIT_REVISION=$(shell git rev-parse --short HEAD) \
yarn start
run-build:
REACT_APP_GIT_TAG=$(shell git describe --tags --abbrev=0 HEAD) \
REACT_APP_GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
REACT_APP_GIT_REVISION=$(shell git rev-parse --short HEAD) \
yarn build
run-build-netlify:
REACT_APP_GIT_TAG=$(shell git describe --tags --abbrev=0 HEAD) \
REACT_APP_GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
REACT_APP_GIT_REVISION=$(shell git rev-parse --short HEAD) \
yarn build && \
cp _redirects build/ && \
netlify deploy --alias=${BUILD_TAG} --dir=build
run-deploy-netlify:
cp _redirects build/ && \
netlify deploy --alias=${BUILD_TAG} --dir=build
build-docker-image:
docker build -t c2dhunilu/journal-of-digital-history:${BUILD_TAG} \
--build-arg GIT_TAG=$(shell git describe --tags --abbrev=0 HEAD) \
--build-arg GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) \
--build-arg GIT_REVISION=$(shell git rev-parse --short HEAD) .