-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathbuild_python_client.sh
More file actions
executable file
·54 lines (41 loc) · 1.57 KB
/
build_python_client.sh
File metadata and controls
executable file
·54 lines (41 loc) · 1.57 KB
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
#!/bin/bash
# This script expects all <app_label>-api.json files to exist in the plugins root directory.
# It produces a <app_label>-python-client.tar and <app_label>-python-client-docs.tar file in the plugins root directory.
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulp_python' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
set -mveuo pipefail
# make sure this script runs at the repo root
cd "$(dirname "$(realpath -e "$0")")"/../../..
pushd ../pulp-openapi-generator
rm -rf "pulp_python-client"
./gen-client.sh "../pulp_python/python-api.json" "python" python "pulp_python"
pushd pulp_python-client
python setup.py sdist bdist_wheel --python-tag py3
twine check "dist/pulp_python_client-"*"-py3-none-any.whl"
twine check "dist/pulp_python_client-"*".tar.gz"
tar cvf "../../pulp_python/python-python-client.tar" ./dist
find ./docs/* -exec sed -i 's/Back to README/Back to HOME/g' {} \;
find ./docs/* -exec sed -i 's/README//g' {} \;
cp README.md docs/index.md
sed -i 's/docs\///g' docs/index.md
find ./docs/* -exec sed -i 's/\.md//g' {} \;
cat >> mkdocs.yml << DOCSYAML
---
site_name: PulpPython Client
site_description: Python bindings
site_author: Pulp Team
site_url: https://docs.pulpproject.org/pulp_python_client/
repo_name: pulp/pulp_python
repo_url: https://github.com/pulp/pulp_python
theme: readthedocs
DOCSYAML
# Building the bindings docs
mkdocs build
# Pack the built site.
tar cvf ../../pulp_python/python-python-client-docs.tar ./site
popd
popd