From 832a027eb9792c02b1ad6106b0fbe34e24d1fdb3 Mon Sep 17 00:00:00 2001 From: KnucklesSG1 Date: Thu, 4 Jan 2024 15:56:31 -0600 Subject: [PATCH] Use new versioner. --- .github/workflows/python_pipeline.yml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/python_pipeline.yml b/.github/workflows/python_pipeline.yml index 7ac4962..b6b6ff1 100644 --- a/.github/workflows/python_pipeline.yml +++ b/.github/workflows/python_pipeline.yml @@ -44,28 +44,10 @@ jobs: if: ${{ env.CURRENT_RELEASE <= env.CURRENT_VERSION }} id: increment_version run: | - version=( ${CURRENT_VERSION//./ } ) + autoversioner -v "${CURRENT_VERSION}" | tee -a VERSION COMMIT_MESSAGE=$(echo "${{ github.event.head_commit.message }}" | tr -d '\n') echo "Commit Message: $COMMIT_MESSAGE" - if [[ "$COMMIT_MESSAGE" == *"patch"* ]]; then - (( version[2]=version[2]+1 )) - echo "Incrementing Patch Version: ${version[@]}" - elif [[ "$COMMIT_MESSAGE" == *"minor"* ]]; then - (( version[1]=version[1]+1 )) - version[2]=0 - echo "Incrementing Minor Version: ${version[@]}" - elif [[ "$COMMIT_MESSAGE" == *"major"* ]]; then - (( version[0]=version[0]+1 )) - version[2]=0 - version[1]=0 - echo "Incrementing Major Version: ${version[@]}" - else - (( version[1]=version[1]+1 )) - echo "To: ${version[1]}" - version[2]=0 - echo "Incrementing Minor Version: ${version[@]}" - fi - NEW_VERSION="${version[0]}.${version[1]}.${version[2]}" + NEW_VERSION="$(cat VERSION)" echo -e "Old Version: $CURRENT_RELEASE\nNew Version: $NEW_VERSION" sed -i "s/CURRENT_VERSION=.*$/CURRENT_VERSION=$NEW_VERSION/" $GITHUB_ENV echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV