forked from dani-garcia/bw_web_builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (36 loc) · 1.02 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
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
help:
@echo "Use either: clean, checkout, patch-web-vault, generate-patch, build, tar, or full"
@echo "Or for docker builds use: docker or docker-extract"
.PHONY: help
clean:
rm -rvf "./web-vault"
rm -rvf "./builds"
rm -rvf "./docker_builds"
.PHONY: clean
checkout:
git submodule update --init --recursive
.PHONY: checkout
build:
./scripts/build_web_vault.sh
.PHONY: build
tar:
./scripts/tar_web_vault.sh
.PHONY: tar
full: checkout build tar
.PHONY: full
docker:
docker build -t bw_web_vault .
.PHONY: docker
docker-extract: docker
@docker rm bw_web_vault_extract || true
@docker create --name bw_web_vault_extract bw_web_vault
@mkdir -vp docker_builds
@rm -rf ./docker_builds/bw_web_vault.tar.gz ./docker_builds/web-vault
@docker cp bw_web_vault_extract:/bw_web_vault.tar.gz ./docker_builds/bw_web_vault.tar.gz
@docker cp bw_web_vault_extract:/web-vault ./docker_builds/web-vault
@docker rm bw_web_vault_extract || true
.PHONY: docker-extract