Skip to content
Snippets Groups Projects
Unverified Commit f3565727 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Update version_bump.yml (#599)

parent 59318e2c
No related branches found
No related tags found
No related merge requests found
......@@ -43,13 +43,13 @@ jobs:
id: new-version
if: steps.bump-type.outputs.bump-type != 'null'
run: |
CURRENT_VERSION='python setup.py --version'
if "${{ steps.bump-type.outputs.bump-type }}" == 'major'; then
NEW_VERSION=`IFS='.' read -ra SPLITVER <<< "$VERSION"; echo $(("${SPLITVER[0]}"+1))."${SPLITVER[1]}"."${SPLITVER[2]}";`
elif "${{ steps.bump-type.outputs.bump-type }}" == 'minor'; then
NEW_VERSION=`IFS='.' read -ra SPLITVER <<< "$VERSION"; echo "${SPLITVER[0]}".$(("${SPLITVER[1]}"+1))."${SPLITVER[2]}";`
elif "${{ steps.bump-type.outputs.bump-type }}" == 'patch'; then
NEW_VERSION=`IFS='.' read -ra SPLITVER <<< "$VERSION"; echo "${SPLITVER[0]}"."${SPLITVER[1]}".$(("${SPLITVER[2]}"+1));`
CURRENT_VERSION=`python setup.py --version`
if [[ "${{ steps.bump-type.outputs.bump-type }}" == 'major' ]]; then
NEW_VERSION=`IFS='.' read -ra SPLITVER <<< "$CURRENT_VERSION"; echo $(("${SPLITVER[0]}"+1))."${SPLITVER[1]}"."${SPLITVER[2]}";`
elif [[ "${{ steps.bump-type.outputs.bump-type }}" == 'minor' ]]; then
NEW_VERSION=`IFS='.' read -ra SPLITVER <<< "$CURRENT_VERSION"; echo "${SPLITVER[0]}".$(("${SPLITVER[1]}"+1))."${SPLITVER[2]}";`
elif [[ "${{ steps.bump-type.outputs.bump-type }}" == 'patch' ]]; then
NEW_VERSION=`IFS='.' read -ra SPLITVER <<< "$CURRENT_VERSION"; echo "${SPLITVER[0]}"."${SPLITVER[1]}".$(("${SPLITVER[2]}"+1));`
fi
echo "::set-output name=new-version::$NEW_VERSION"
echo "::set-output name=current-version::$CURRENT_VERSION"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment