Skip to content

Commit f1d139b

Browse files
authored
chore: improve pre-release logic (#3365)
* automate rc numbering * change to created valid release candidate numbers
1 parent 3f1e707 commit f1d139b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/test_deploy.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -961,30 +961,27 @@ jobs:
961961
run: |
962962
python -m pip install --upgrade pip
963963
python -m pip install poetry poetry-lock-package twine
964-
poetry self add "poetry-dynamic-versioning[plugin]"
965-
poetry install -E service --with dev,tests,docs
964+
poetry --no-ansi self add "poetry-dynamic-versioning[plugin]"
965+
poetry --no-ansi install -E service --with dev,tests,docs
966966
git config --global --add user.name "Renku Bot"
967967
git config --global --add user.email "[email protected]"
968-
- name: Get version
969-
id: get-version
968+
- name: Calculate pre-release version
969+
id: pre-release-version
970970
run: |
971-
export VERSION=$(renku --version)
972-
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
973-
echo "renku_version=${VERSION}rc1" >> $GITHUB_OUTPUT
974-
else
975-
echo "RENKU_VERSION=${VERSION}" >> $GITHUB_OUTPUT
976-
fi
971+
renku_version=$(renku --version)
972+
rc=$(curl -s https://pypi.org/pypi/renku/json | jq ".releases|keys_unsorted | map(select( . | startswith(\"$renku_version\"))) | map(match(\"[0-9]+\\\\.[0-9]+\\\\.[0-9]+(rc([0-9]+))?\").captures[1].string // 0) | max | tonumber + 1")
973+
echo "RELEASE_VERSION=${renku_version}rc${rc}" >> "$GITHUB_OUTPUT"
977974
- name: Build and publish to pypi
978975
env:
979976
POETRY_VIRTUALENVS_CREATE: false
980977
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
981-
POETRY_DYNAMIC_VERSIONING_BYPASS: ${{ steps.get-version.outputs.RENKU_VERSION }}
978+
POETRY_DYNAMIC_VERSIONING_BYPASS: ${{ steps.pre-release-version.outputs.RELEASE_VERSION }}
982979
run: make publish-package
983980
- name: Build and publish lock package
984981
env:
985982
POETRY_VIRTUALENVS_CREATE: false
986983
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
987-
POETRY_DYNAMIC_VERSIONING_BYPASS: ${{ steps.get-version.outputs.RENKU_VERSION }}
984+
POETRY_DYNAMIC_VERSIONING_BYPASS: ${{ steps.pre-release-version.outputs.RELEASE_VERSION }}
988985
run: make publish-lock-package
989986

990987
update-develop-branch:

poetry.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

renku/ui/cli/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@
229229
To address this issue, the program can dump a mapping of input and output files
230230
that it is accessing in ``inputs.yml`` and ``outputs.yml``. This YAML file
231231
should be of the format
232+
232233
.. code-block:: YAML
233234
234235
name1: path1

0 commit comments

Comments
 (0)