From 6303c91ac617cb0ded4eca83d37269efd9510eff Mon Sep 17 00:00:00 2001 From: Petro Tiurin Date: Tue, 11 Jan 2022 12:42:03 +0000 Subject: [PATCH] ref: Move version number to setup.cfg --- .github/workflows/release.yml | 8 +++++--- setup.cfg | 2 +- src/firebolt/__init__.py | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aec2f333277..59d50464e7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,9 +55,11 @@ jobs: - name: Version bump run: | - # Bump __version__ = "" in __init__.py - sed -i "s/^__version__ = \".*\"/__version__ = \"${{ steps.tag_generation.outputs.new_tag }}\"/" src/firebolt/__init__.py - git add src/firebolt/__init__.py + # Bump version = in setup.cfg + sed -i "s/^version = .*/version = ${{ steps.tag_generation.outputs.new_tag }}/" setup.cfg + # Verify the change + python3 -c "from configparser import ConfigParser; c = ConfigParser(); c.read('setup.cfg'); assert c['metadata']['version'] == '${{ steps.tag_generation.outputs.new_tag }}', 'Version was not updated correctly in setup.cfg'" + git add setup.cfg git commit -m "Automatic version bump to ${{ steps.tag_generation.outputs.new_tag }}" git push origin main diff --git a/setup.cfg b/setup.cfg index 470de21b51f..e93e4443c94 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = firebolt_sdk -version = attr: firebolt.__version__ +version = 0.2.1 description = Python SDK for Firebolt long_description = file: README.md long_description_content_type = text/markdown diff --git a/src/firebolt/__init__.py b/src/firebolt/__init__.py index 3ced3581bb6..e69de29bb2d 100644 --- a/src/firebolt/__init__.py +++ b/src/firebolt/__init__.py @@ -1 +0,0 @@ -__version__ = "0.2.1"