fixes index in version script

This commit is contained in:
Christopher Lowenthal 2022-10-31 16:58:42 -04:00
parent a177b0731e
commit bed4f11d43
2 changed files with 2 additions and 4 deletions

View file

@ -14,10 +14,8 @@ jobs:
with:
fetch-depth: 0
- run: echo $(git describe --tags)
- run: echo $(sh .github/workflows/version.sh)
shell: sh
- run: .github/workflows/version.sh
- run: echo "version=$(sh .github/workflows/version.sh)" >> $GITHUB_OUTPUT
shell: sh
build-lattice:
runs-on: ubuntu-latest

View file

@ -1,5 +1,5 @@
#!/bin/sh
current=$(git describe --tags | grep -Eo '[0-9]*?\.[0-9]*?\.[0-9]*')
array=($(echo $current | tr '.' '\n'))
array[2]=$((array[2]+1))
array[1]=$((array[1]+1))
echo $(IFS="." ; echo "${array[*]}")