-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (25 loc) · 817 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
RELEASEDEST= ${HOME}/revel/wg.new
APPDIR= src/github.com/jeff-blank/wg
JSDIR= public/js
JQSRC= jq
REINPLACE= sed -i ''
APPCONF= conf/app.conf
APPCONF_IN= ${APPCONF}.in
js:
(cd ${JQSRC} && gmake all)
release: js ${APPCONF}
${GOPATH}/bin/revel build -m prod github.com/jeff-blank/wg \
${RELEASEDEST}
${REINPLACE} '/runMode/s/^/exec /;s/wg\.new/wg/g' ${RELEASEDEST}/run.sh
${APPCONF}:
@echo 'Check for $$NR_LICENSE...'
@[ -n "${NR_LICENSE}" ]
@echo 'Check for $$REVEL_SECRET...'
@[ -n "${REVEL_SECRET}" ]
@echo 'Check for $$DB_CONNECT_PROD...'
@[ -n "${DB_CONNECT_PROD}" ]
cp ${APPCONF_IN} $@
@echo Write secrets to $@
@${REINPLACE} 's/%%NR_LICENSE%%/'"${NR_LICENSE}"'/' $@
@${REINPLACE} 's/%%REVEL_SECRET%%/'"${REVEL_SECRET}"'/' $@
@${REINPLACE} 's,%%DB_CONNECT_PROD%%,'"${DB_CONNECT_PROD}"',' $@