Skip to content

Commit

Permalink
Use new versioner.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed Jan 4, 2024
1 parent d916905 commit 832a027
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/python_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 832a027

Please sign in to comment.