mirror of
https://github.com/hanzo-ml/katib.git
synced 2026-09-24 00:31:27 +00:00
feat(release): Update Katib release script to publish SDK models (#2584)
* feat(release): Update Katib release script to publish SDK models Signed-off-by: Andrey Velichkevich <[email protected]> * Fix comment Signed-off-by: Andrey Velichkevich <[email protected]> --------- Signed-off-by: Andrey Velichkevich <[email protected]>
This commit is contained in:
committed by
GitHub
parent
d9e3fb6928
commit
5755f90531
@@ -7,6 +7,7 @@ __pycache__/
|
||||
build/
|
||||
*.charm
|
||||
test/unit/v1beta1/metricscollector/testdata
|
||||
dist/
|
||||
|
||||
# SDK generator JAR file
|
||||
hack/gen-python-sdk/openapi-generator-cli.jar
|
||||
|
||||
@@ -17,6 +17,8 @@ This is the instruction on how to make a new release for the Katib project.
|
||||
|
||||
- Install `PyGithub` to generate the [Changelog](./../../CHANGELOG.md): `pip install PyGithub==1.55`
|
||||
|
||||
- Install `build` to publish the Katib models: `pip install build`
|
||||
|
||||
- Install `twine` to publish the SDK package: `pip install twine==3.4.1`
|
||||
|
||||
- Create a [PyPI Token](https://pypi.org/help/#apitoken) to publish Katib SDK.
|
||||
@@ -100,6 +102,8 @@ Follow these steps to cut a new Katib release:
|
||||
|
||||
- Publish Katib Python SDK with the version: `X.Y.Z`.
|
||||
|
||||
- Publish Katib models with the version: `X.Y.Z` for Kubeflow SDK.
|
||||
|
||||
- Push above changes to the Katib upstream `release-X.Y` branch with this commit:
|
||||
`Katib official release vX.Y.Z`
|
||||
|
||||
|
||||
@@ -94,6 +94,24 @@ rm -r dist/ build/
|
||||
cd ../../..
|
||||
echo -e "\nKatib Python SDK ${sdk_version} has been published\n"
|
||||
|
||||
# ------------------ Publish Katib Models for Kubeflow SDK ------------------
|
||||
echo -e "\nPublishing Katib Python models for Kubeflow SDK, version: ${sdk_version}\n"
|
||||
|
||||
# Change version in __init__.py
|
||||
cd api/python_api
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
sed -i '' -e "s@__version__ = \".*\"@__version__ = \"${sdk_version}\"@" kubeflow_katib_api/__init__.py
|
||||
else
|
||||
sed -i -e "s@__version__ = \".*\"@__version__ = \"${sdk_version}\"@" kubeflow_katib_api/__init__.py
|
||||
fi
|
||||
# Upload Katib models to PyPI.
|
||||
python -m build
|
||||
twine upload dist/*
|
||||
rm -r dist/
|
||||
cd ../..
|
||||
echo -e "\nKatib Python API models for Kubeflow SDK have been published"
|
||||
|
||||
|
||||
# ------------------ Commit changes ------------------
|
||||
git commit -a -m "Katib official release ${TAG}"
|
||||
# Create a new tag.
|
||||
|
||||
Reference in New Issue
Block a user