Skip to content

Commit

Permalink
default minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
hallvictoria committed Jan 27, 2025
1 parent e66218a commit 6842770
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eng/templates/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ jobs:
# Extract the last two digits (minor version) from the branch name
version=$(echo $(Build.SourceBranchName) | sed 's/dev-\([0-9]*\)/\1/')
minor_version=${version: -2} # Get last two digits
# Check if minor_version is a number; if not, set default to 13
if ! [[ "$minor_version" =~ ^[0-9]+$ ]]; then
minor_version=13
fi
echo "Extracted minor version: $minor_version"
echo "##vso[task.setvariable variable=pythonVersion]$minor_version"
displayName: 'Extract Python version from branch name'
Expand Down

0 comments on commit 6842770

Please sign in to comment.