Skip to content

Commit

Permalink
first issue with package yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
damies13 committed Feb 19, 2024
1 parent b1ea213 commit 234106b
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/Package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: "Echo Vars"
run: |
echo matrix.platform: ${{ matrix.platform }}
echo matrix.python: ${{ matrix.python }}
- name: Get Version Number
run: |
currversion=$(git rev-parse --abbrev-ref HEAD)
echo $currversion
if [[ "$currversion" =~ v[0-9]\. ]]; then
verparts=($(echo $currversion | tr "-" "\n"))
len=${#verparts[@]}
if [ $len -gt 1 ]; then
txtversion=${verparts[0]}-${verparts[1]}
else
txtversion=${verparts[0]}
currversion=$(git rev-parse --abbrev-ref HEAD)
echo $currversion
if [[ "$currversion" =~ v[0-9]\. ]]; then
verparts=($(echo $currversion | tr "-" "\n"))
len=${#verparts[@]}
if [ $len -gt 1 ]; then
txtversion=${verparts[0]}-${verparts[1]}
else
txtversion=${verparts[0]}
fi
numver=$(echo $currversion | sed -E 's/v([^-]*)/\1/')
echo numver\: $numver
version=$numver
echo version\: $version
fi
numver=$(echo $currversion | sed -E 's/v([^-]*)/\1/')
echo numver\: $numver
version=$numver
echo version\: $version
fi
- name: Update Version Number in python files
run: |
sed -i -e "s/version = \"[^\"]*\"/version = \"${version}\"/" $(find . -name "*.py")
sed -i -e "s/# Version .*/# Version ${version}/" $(find . -name "*.py")
sed -i -e "s/version = \"[^\"]*\"/version = \"${version}\"/" $(find . -name "*.py")
sed -i -e "s/# Version .*/# Version ${version}/" $(find . -name "*.py")

0 comments on commit 234106b

Please sign in to comment.