Skip to content

Commit

Permalink
Update azure-pipelines.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
apudovkin-ms authored Sep 16, 2024
1 parent e510056 commit cdf841f
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,35 +65,51 @@ extends:
arguments: $(Build.BuildNumber)
script: >
#!/usr/bin/env bash

# Update the version strings in the source code


# Input:

# $1 - the version string, if omitted, use ${BUILD_BUILDID}
version=$1


version=$1


if [ -z ${version} ]; then
version=${BUILD_BUILDID}
fi
fi


if [ -z ${version} ]; then
echo 'Missing version string'
exit 1
fi
fi


echo "Add dev version suffix: $version"



platform=`uname`



echo "Platform: $platform"



pattern="s/^VERSION = [\"']\(.*\)[\"']/VERSION = \"\1.dev$version\"/"



if [ "${platform}" == "MSYS_NT-10.0" ]; then
# On preview version of sh build task, the script will pick up the wrong version of find.exe
find="C:\Program Files\Git\usr\bin\find.exe"
else
find="find"
fi



for each in $("${find}" . -name setup.py); do
if [ "$platform" == "Darwin" ]; then
sed -i "" "${pattern}" "${each}"
Expand Down

0 comments on commit cdf841f

Please sign in to comment.