forked from operate-first/operate-first.github.io-old
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
92 lines (64 loc) · 1.83 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
DEFAULT_ENV_FILE := .env.default
ifneq ("$(wildcard $(DEFAULT_ENV_FILE))","")
include ${DEFAULT_ENV_FILE}
export $(shell sed 's/=.*//' ${DEFAULT_ENV_FILE})
endif
ENV_FILE := .env
ifneq ("$(wildcard $(ENV_FILE))","")
include ${ENV_FILE}
export $(shell sed 's/=.*//' ${ENV_FILE})
endif
##################################
# DEV - run apps locally for development
.PHONY: dev
dev:
XDG_CONFIG_HOME=/tmp ./scripts/dev.sh
##################################
# DEV-CLEAN - cleans local development environment
.PHONY: dev-clean
dev-clean:
./scripts/dev-clean.sh
##################################
# GH-PAGES - build app and deploy to GitHub pages
.PHONY: gh-pages
gh-pages:
./scripts/gh-pages.sh
##################################
# GH-PAGES-FORK - build app from your fork and deploy to GitHub pages with the appropriate pathPrefix
.PHONY: gh-pages-fork
gh-pages-fork:
./scripts/gh-pages-fork.sh
##################################
# GH-PAGES-BRANCH - build app from your branch on your fork and deploy to GitHub pages under a path
.PHONY: gh-pages-branch
gh-pages-branch:
./scripts/gh-pages-branch-fork.sh
##################################
# BUILD - build image locally using s2i
.PHONY: build
build:
./scripts/build.sh
##################################
# PUSH - push image to repository
.PHONY: push
push:
./scripts/push.sh
##################################
.PHONY: login
login:
ifdef OC_TOKEN
$(info **** Using OC_TOKEN for login ****)
oc login ${OC_URL} --token=${OC_TOKEN}
else
$(info **** Using OC_USER and OC_PASSWORD for login ****)
oc login ${OC_URL} -u ${OC_USER} -p ${OC_PASSWORD} --insecure-skip-tls-verify=true
endif
##################################
.PHONY: deploy
deploy: login
./scripts/deploy.sh
##################################
.PHONY: undeploy
undeploy: login
./scripts/undeploy.sh
##################################