-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathMakefile
49 lines (38 loc) · 1.01 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 tidy
IMG_REGISTRY ?= docker.io
IMG_VERSION ?= latest
.PHONY: install
install:
../../bin/openapi-generator-cli generate -i ../../api/openapi/model-registry.yaml -g python -o src/ --package-name mr_openapi --additional-properties=library=asyncio,generateSourceCodeOnly=true,useOneOfDiscriminatorLookup=true
mv src/mr_openapi{_,/}README.md
git apply patches/*
poetry install
.PHONY: clean
clean:
rm -rf src/mr_openapi
.PHONY: build-mr
build-mr:
cd ../../ && IMG_REGISTRY=${IMG_REGISTRY} IMG_VERSION=${IMG_VERSION} make image/build
.PHONY: test-e2e
test-e2e: build-mr
poetry run pytest --e2e -s
.PHONY: test
test:
poetry run pytest -s
.PHONY: lint
lint:
poetry run ruff check
poetry run black src/mr_openapi --check
.PHONY: tidy
tidy:
poetry run ruff check --fix --unsafe-fixes || true
poetry run black src/mr_openapi
.PHONY: build
build: install tidy
poetry build
.PHONY: publish
publish: build
poetry publish --build -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD}
.PHONY: update
update:
poetry lock