/
Makefile
66 lines (54 loc) · 2.04 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
local_path := $(PWD)
front_path := $(local_path)/apps/front
remote_test_host := lonlat.pentatrion.com
remote_prod_host := lonlat.org
maplibre_react_sandbox_path := $(local_path)/apps/maplibre-react-sandbox
maplibre_react_sandbox_host := maplibre-react-sandbox.lonlat.pentatrion.com
storybook_path := $(local_path)/apps/storybook
storybook_host := storybook.lonlat.pentatrion.com
assets_path := $(local_path)/extra/assets/public
assets_host := assets.lonlat.org
.PHONY: help
help:
@grep -E '(^[a-zA-Z_-]+:.*?## .*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-22s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.PHONY: deploy-front-test
deploy-front-test: ## Build and deploy examples
cd $(front_path) && pnpm build
rsync -av --delete \
$(front_path)/dist/ \
berlin:prod/$(remote_test_host)
@echo "go : https://$(remote_test_host)"
.PHONY: deploy-front
deploy-front: ## Build and deploy examples
cd $(front_path) && pnpm build
rsync -av --delete \
$(front_path)/dist/ \
berlin:prod/$(remote_prod_host)
@echo "go : https://$(remote_prod_host)"
.PHONY: deploy-front-with-errors
deploy-front-with-errors: ## Build and deploy examples
cd $(front_path) && pnpm build-with-errors
rsync -av --delete \
$(front_path)/dist/ \
berlin:prod/$(remote_prod_host)
@echo "go : https://$(remote_prod_host)"
.PHONY: deploy-maplibre-react-sandbox
deploy-maplibre-react-sandbox: ## Build and deploy examples
cd $(maplibre_react_sandbox_path) && pnpm build
rsync -av --delete \
$(maplibre_react_sandbox_path)/dist/ \
berlin:prod/$(maplibre_react_sandbox_host)
@echo "go : https://$(maplibre_react_sandbox_host)"
.PHONY: deploy-storybook
deploy-storybook: ## Build and deploy examples
cd $(storybook_path) && pnpm build
rsync -av --delete \
$(storybook_path)/storybook-static/ \
berlin:prod/$(storybook_host)
@echo "go : https://$(storybook_host)"
.PHONY: deploy-assets
deploy-assets: ## Build and deploy examples
rsync -av --delete \
$(assets_path)/ \
berlin:prod/$(assets_host)
@echo "go : https://$(assets_host)"