-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile.docker
More file actions
59 lines (51 loc) · 2.12 KB
/
Copy pathMakefile.docker
File metadata and controls
59 lines (51 loc) · 2.12 KB
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
# This Makefile configuration is adapted from the main Makefile in the project.
# It removes any Docker related commands and changes the shell from bash to
# ash. The remaining commands are either:
# - Used by the Dockerfile configuration
# - Used by the entrypoint.sh script
# - Used when developing within a running Docker container
# The Docker composition defined in this repository (in docker-compose.yml)
# is configured to mount the src/ directory on the host into the Docker
# container it starts. This Makefile can then be used in the running container
# to work with changes made to the project's source code.
PATH := node_modules/.bin:$(PATH)
# This should be changed if the Docker configuration moves away from Alpine
# Linux in the future.
SHELL := /bin/ash
current_dir = $(shell pwd)
all: install gulp build
dev: install gulp build-dev
# Used by entrypoint.sh when run with the `build` command
build: install install-config
ng build --prod
# BusyBox commands don't always support the full set of options available
# to their GNU counterparts:
# -z is the short form for --zero-terminated
# -0 is the short form for --null
find dist -type f -print0 | sort -z | xargs -0 shasum | shasum > dist/config/app.version
# Used by entrypoint.sh when run with the `start` command
build-dev: install-config
# BusyBox commands don't always support the full set of options available
# to their GNU counterparts:
# -z is the short form for --zero-terminated
# -0 is the short form for --null
find src -type f -print0 | sort -z | xargs -0 shasum | shasum > src/config/app.version
# Used in the Dockerfile configuration
install:
npm ci
bower --allow-root install
# Used in the Dockerfile configuration
gulp: install
gulp
install-config:
# Workaround equivalent to the --no-clobber option
false | cp --interactive src/config/config.sample.json src/config/config.json || :
clean:
# BusyBox commands don't always support the full set of options available
# to their GNU counterparts:
# -r is the short form for --recursive
# -f is the short form for --force
rm -rf ./bower_components
rm -rf ./src/assets/bower
rm -rf ./node_modules
rm -rf ./dist