-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
50 lines (40 loc) · 1.44 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
PROTOC_GEN_TS_PATH="./node_modules/.bin/protoc-gen-ts"
REGISTRY_NAME=ghcr.io/wault-pw/eva
REGISTRY_NAME_BUNDLE=shlima/wault
VERSION:=$(shell cat VERSION)
proto:
protoc \
--plugin="protoc-gen-ts=${PROTOC_GEN_TS_PATH}" \
--js_out="import_style=commonjs,binary:src/desc" \
--ts_out="src/desc" \
--proto_path=protos \
alice_v1.proto
test\:unit:
yarn run test:unit
test\:e2e:
yarn run test:e2e
generate\:spa:
node ./scripts/spa.js dist/index.html > dist/backup.html
generate\:mpa:
rm -rf dist/*
yarn build
node ./scripts/integrity.js dist/index.html > dist/index0.html
mv dist/index0.html dist/index.html
build: export TAG=$(VERSION)
build:
docker build --no-cache -f ./Dockerfile -t ${REGISTRY_NAME}:${TAG} --build-arg VERSION=${VERSION} .
docker tag ${REGISTRY_NAME}:${TAG} ${REGISTRY_NAME}:latest
push: export TAG=$(VERSION)
push:
docker push ${REGISTRY_NAME}:${TAG}
docker push ${REGISTRY_NAME}:latest
build\:bundle: export TAG=$(VERSION)
build\:bundle:
docker build --no-cache -f ./DockerfileBundle -t ${REGISTRY_NAME_BUNDLE}:${TAG} --build-arg VERSION=${VERSION} .
docker tag ${REGISTRY_NAME_BUNDLE}:${TAG} ${REGISTRY_NAME_BUNDLE}:latest
push\:bundle: export TAG=$(VERSION)
push\:bundle:
docker push ${REGISTRY_NAME_BUNDLE}:${TAG}
docker push ${REGISTRY_NAME_BUNDLE}:latest
run\:bundle:
docker run --rm -e PG_DSN="postgres://${USER}@host.docker.internal:5432/alice?sslmode=disable&timezone=utc" -p 3000:3000 ${REGISTRY_NAME_BUNDLE}