-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (42 loc) · 1.19 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
DOCKER_COMPOSE := docker-compose --file containers/docker-compose.yml --project-name barley
help: ## Show this help.
@awk -F: '/^[A-Za-z0-9_-]+:.*## / { sub(/.*## /, "", $$2); printf "make %-14s - %s\n", $$1, $$2 }' Makefile
assemble: ## Assemble Electron app.
make rust-main
make npm-install
make webpack
make electron
rust-main: ## Build Rust project for main process.
$(DOCKER_COMPOSE) run \
--rm \
-e BARLEY_TASK='main' \
app-builder \
/barley/containers/rs.build.sh
npm-install: ## Run `npm install`.
$(DOCKER_COMPOSE) run \
--rm \
-e BARLEY_TASK='npm-install' \
app-builder \
/barley/containers/js.build.sh
webpack: ## Run webpack.
$(DOCKER_COMPOSE) run \
--rm \
-e BARLEY_TASK='webpack-build' \
app-builder \
/barley/containers/js.build.sh
electron: ## Build Electron app.
$(DOCKER_COMPOSE) run \
--rm \
-e BARLEY_TASK='electron-make' \
app-builder \
/barley/containers/js.build.sh
electron-start: ## Launch Electron app.
cd project-js; \
npm run electron-start
docker-image: ## Build docker image.
cd containers; \
. ./version.sh && ./docker-build.sh
reset: ## Recreate containers.
$(DOCKER_COMPOSE) up \
--build \
--force-recreate