This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
49 lines (49 loc) · 1.68 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
all: install build format test
install: install-client install-server
install-client:
cd policyengine-client; pnpm install
install-server:
pip install -e .
build: build-client build-server
build-client:
cd policyengine-client; pnpm run build
rm -rf policyengine/static
cp -r policyengine-client/build policyengine/static
build-server:
rm -rf build/ dist/ policyengine.egg-info; python setup.py sdist bdist_wheel
publish: publish-client publish-server
publish-server: policyengine
twine upload policyengine/dist/* --skip-existing
publish-client:
cd policyengine-client; pnpm publish
debug-server:
POLICYENGINE_DEBUG=1 FLASK_APP=policyengine.server:app FLASK_DEBUG=1 flask run
debug-client:
cd policyengine-client; pnpm start
format:
autopep8 policyengine -r -i
autopep8 setup.py -i
black policyengine -l 79
black . -l 79
test:
pytest policyengine/tests -vv
deploy: build-client
cat $(GOOGLE_APPLICATION_CREDENTIALS) > .gac.json
gcloud config set app/cloud_build_timeout 6000
y | gcloud app deploy
rm .gac.json
deploy-beta:
cat $(GOOGLE_APPLICATION_CREDENTIALS) > .gac.json
gcloud config set app/cloud_build_timeout 6000
y | gcloud app deploy --version beta --no-promote
rm .gac.json
server: install-server test
changelog:
build-changelog changelog.yaml --output changelog.yaml --update-last-date --start-from 1.4.1 --append-file changelog_entry.yaml
build-changelog changelog.yaml --org PolicyEngine --repo policyengine --output CHANGELOG.md --template .github/changelog_template.md
bump-version changelog.yaml policyengine-client/package.json setup.py policyengine/policyengine.py
rm changelog_entry.yaml || true
touch changelog_entry.yaml
documentation:
jb clean docs
jb build docs -W