52 lines
2.0 KiB
JSON
Generated
52 lines
2.0 KiB
JSON
Generated
{
|
|
"name": "api-client-python",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "libs/api-client-python/src",
|
|
"projectType": "library",
|
|
"targets": {
|
|
"generate:api-client": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": ["pythonApiClient"],
|
|
"outputs": ["{projectRoot}/daytona_api_client"],
|
|
"options": {
|
|
"commands": [
|
|
"rm -rf {projectRoot}/daytona_api_client",
|
|
"yarn run openapi-generator-cli generate --git-repo-id=daytona --git-user-id=daytonaio -i dist/apps/api/openapi.json -g python -t hack/python-client/openapi-templates --additional-properties=packageName=daytona_api_client,projectName=daytona_api_client,packageVersion=$DEFAULT_PACKAGE_VERSION,pythonPackageName=daytona_api_client,disallowAdditionalPropertiesIfNotPresent=false -o {projectRoot}",
|
|
"bash hack/python-client/postprocess.sh {projectRoot}"
|
|
],
|
|
"parallel": false
|
|
},
|
|
"dependsOn": [
|
|
{
|
|
"target": "openapi",
|
|
"projects": "api"
|
|
}
|
|
]
|
|
},
|
|
"deps-check": {},
|
|
"build-py-lib": {},
|
|
"build": {
|
|
"inputs": [
|
|
"pythonLib",
|
|
{ "dependentTasksOutputFiles": "**/*", "transitive": true }
|
|
],
|
|
"outputs": ["{projectRoot}/dist/**"],
|
|
"dependsOn": ["build-py-lib"]
|
|
},
|
|
"publish": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"commands": [
|
|
"poetry publish --username __token__ --password $PYPI_TOKEN --no-interaction",
|
|
"for i in $(seq 1 20); do if pip download daytona_api_client==${PYPI_PKG_VERSION} -q -d /tmp; then echo \"daytona_api_client==${PYPI_PKG_VERSION} is now downloadable from PyPI\" && sleep 5 && exit 0; else printf '.\n' && sleep 5; fi; done; echo \"Timeout waiting for daytona_api_client==${PYPI_PKG_VERSION} on PyPI\" >&2; exit 1"
|
|
],
|
|
"parallel": false
|
|
}
|
|
}
|
|
},
|
|
"tags": []
|
|
}
|