From 3d982d0fda1aff15b5bee4b22b4dd01a88c5d8a0 Mon Sep 17 00:00:00 2001 From: Sassan Haradji Date: Wed, 23 Oct 2024 12:21:56 +0400 Subject: [PATCH] chore(release): v0.18.1 --- .github/workflows/integration_delivery.yml | 8 ++++---- CHANGELOG.md | 2 +- setup_scm_schemes.py | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_delivery.yml b/.github/workflows/integration_delivery.yml index 28784a4..4912b1d 100644 --- a/.github/workflows/integration_delivery.yml +++ b/.github/workflows/integration_delivery.yml @@ -177,7 +177,7 @@ jobs: fi else VERSION_CHANGELOG=$(echo $FIRST_HEADER | sed 's/Version //') - if [ "${{ steps.extract-version.outputs.VERSION }}" != "$VERSION_CHANGELOG" ]; then + if [ "${{ steps.extract-version.outputs.VERSION }}" =~ "^$VERSION_CHANGELOG\.dev[0-9]+" ]; then echo "Error: Version extracted from CHANGELOG.md does not match the version in pyproject.toml" exit 1 else @@ -207,9 +207,9 @@ jobs: publish: name: Publish if: >- - github.event_name == 'push' && github.ref == 'refs/heads/main' || - github.event_name == 'pull_request' && github.event.pull_request.base.ref - == 'main' + github.event_name == 'push' && (github.ref == 'refs/heads/main' || + startsWith(github.ref, 'refs/tags/v')) || github.event_name == + 'pull_request' && github.event.pull_request.base.ref == 'main' needs: - type-check - lint diff --git a/CHANGELOG.md b/CHANGELOG.md index a5847a0..1791d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Upcoming +## Version 0.18.1 - chore: migrate from poetry to uv for the sake of improving performance and dealing with conflicting sub-dependencies - refactor(core): avoid passing events to `dispatch`, to enforce using them as side-effects only diff --git a/setup_scm_schemes.py b/setup_scm_schemes.py index 12d5c75..1545636 100644 --- a/setup_scm_schemes.py +++ b/setup_scm_schemes.py @@ -10,5 +10,7 @@ def local_scheme(version) -> str: # noqa: ANN001 version.node = re.sub(r'.', lambda match: str(ord(match.group(0))), version.node) original_local_version = get_local_node_and_date(version) + if not original_local_version: + return original_local_version numeric_version = original_local_version.replace('+', '').replace('.d', '') return datetime.now(UTC).strftime('%y%m%d') + numeric_version