-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (45 loc) · 1.88 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
############################################################################
# defaults
############################################################################
openapi-python-client=`which openapi-python-client`
pc=`which pip-compile`
ps=`which pip-sync`
package_dir=component_registry_bindings/
bindings_dir=$(package_dir)bindings/
############################################################################
# client generation
############################################################################
update:
@echo "Updating bindings python client"
cd $(package_dir) \
&& $(openapi-python-client) update --path openapi_schema.yml \
--config $(shell pwd)/$(package_dir)bindings_config.yml \
--custom-template-path templates
touch $(bindings_dir)__init__.py
create:
@echo "Creating bindings python client"
cd $(package_dir) \
&& $(openapi-python-client) generate --path openapi_schema.yml \
--config $(shell pwd)/$(package_dir)bindings_config.yml \
--custom-template-path templates
touch $(bindings_dir)__init__.py
############################################################################
# dev entrypoints
############################################################################
compile-deps:
@echo ">compiling python dependencies"
$(pc) --generate-hashes --allow-unsafe requirements.in
$(pc) --generate-hashes --allow-unsafe devel-requirements.in
[ -f local-requirements.in ] && $(pc) --generate-hashes --allow-unsafe local-requirements.in || true
sync-deps:
@echo ">synchronizing python dependencies"
$(ps) requirements.txt devel-requirements.txt $$([ -f local-requirements.txt ] && echo 'local-requirements.txt')
download-schema:
@echo ">downloading Component Registry OpenAPI schema for ref \"$(ref)\""
scripts/download_schema.sh $(ref)
patch-release:
@echo ">preparing patch release"
scripts/patch_release.sh
release:
@echo ">preparing major/minor release"
scripts/release.sh