From 29b5c554d618a51b9c8a9843251431cd3c13dd32 Mon Sep 17 00:00:00 2001 From: Hossein Shafagh Date: Fri, 12 Mar 2021 10:42:59 -0800 Subject: [PATCH] allow automatic version bumping --- .github/workflows/lemur-publish-release-pypi.yml | 10 ++++++++++ lemur/__about__.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lemur-publish-release-pypi.yml b/.github/workflows/lemur-publish-release-pypi.yml index 26185489..816146d0 100644 --- a/.github/workflows/lemur-publish-release-pypi.yml +++ b/.github/workflows/lemur-publish-release-pypi.yml @@ -18,6 +18,16 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.x' + - name: Autobump version + run: | + # from refs/tags/v0.8.1 get 0.8.1 + VERSION=$(echo $GITHUB_REF | sed 's#.*/v##') + PLACEHOLDER='__version__ = "develop"' + VERSION_FILE='lemur/__about__.py' + # in case placeholder is missing, exists with code 1 and github actions aborts the build + grep "$PLACEHOLDER" "$VERSION_FILE" + sed -i "s/$PLACEHOLDER/__version__ = \"${VERSION}\"/g" "$VERSION_FILE" + shell: bash - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/lemur/__about__.py b/lemur/__about__.py index b0d09167..2a6db3c1 100644 --- a/lemur/__about__.py +++ b/lemur/__about__.py @@ -15,7 +15,7 @@ __title__ = "lemur" __summary__ = "Certificate management and orchestration service" __uri__ = "https://github.com/Netflix/lemur" -__version__ = "0.8.1" +__version__ = "develop" __author__ = "The Lemur developers" __email__ = "security@netflix.com"