-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
82 lines (56 loc) · 2.28 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
help: ## Show this help.
@sed -ne '/@sed/!s/## //p' $(MAKEFILE_LIST)
## Installs pants launcher binary using the get-pants script.
## If $CI is true, assume it's installed already (through GHA), so just copy the wrapper script.
pants:
ifeq ($(CI),true)
cp scripts/pantsw pants
else
./get-pants --bin-dir .
endif
## Packages and installs the python packages.
install-python-components: pants
./pants package ::
python3 -m pip install dist/*.whl --force-reinstall
## Publishes java packages to maven local.
install-java-components:
cd codegen && ./gradlew publishToMavenLocal
## Installs java and python components locally.
install-components: install-python-components install-java-components
## Builds the Java code generation packages.
smithy-build:
cd codegen && ./gradlew clean build
## Generates the protocol tests, rebuilding necessary Java packages.
generate-protocol-tests:
cd codegen && ./gradlew clean :smithy-python-protocol-test:build
## Runs already-generated protocol tests.
run-protocol-tests:
cd codegen/smithy-python-protocol-test/build/smithyprojections/smithy-python-protocol-test/rest-json-1/python-client-codegen && \
python3 -m pip install '.[tests]' && \
python3 -m pytest tests
## Generates and runs protocol tests.
test-protocols: install-python-components generate-protocol-tests run-protocol-tests
## Runs formatters/fixers/linters for the python packages.
lint-py: pants
./pants fix lint python-packages/smithy-core::
./pants fix lint python-packages/smithy-http::
./pants fix lint python-packages/smithy-aws-core::
./pants fix lint python-packages/smithy-json::
## Runs checkers for the python packages.
check-py: pants
./pants check python-packages/smithy-core::
./pants check python-packages/smithy-http::
./pants check python-packages/smithy-aws-core::
./pants check python-packages/smithy-json::
## Runs tests for the python packages.
test-py: pants
./pants test python-packages/smithy-core::
./pants test python-packages/smithy-http::
./pants test python-packages/smithy-aws-core::
./pants test python-packages/smithy-json::
## Runs formatters/fixers/linters/checkers/tests for the python packages.
build-py: lint-py check-py test-py
## Clean up generated code, artifacts, and remove pants.
clean:
rm -rf pants dist/
cd codegen && ./gradlew clean