Skip to content

Commit cdf841f

Browse files
authored
Update azure-pipelines.yml
1 parent e510056 commit cdf841f

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

azure-pipelines.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,35 +65,51 @@ extends:
6565
arguments: $(Build.BuildNumber)
6666
script: >
6767
#!/usr/bin/env bash
68+
69+
6870
# Update the version strings in the source code
71+
72+
6973
# Input:
74+
7075
# $1 - the version string, if omitted, use ${BUILD_BUILDID}
71-
version=$1
76+
77+
78+
version=$1
79+
7280

7381
if [ -z ${version} ]; then
7482
version=${BUILD_BUILDID}
75-
fi
83+
fi
84+
7685

7786
if [ -z ${version} ]; then
7887
echo 'Missing version string'
7988
exit 1
80-
fi
89+
fi
90+
8191

8292
echo "Add dev version suffix: $version"
83-
93+
94+
8495
platform=`uname`
85-
96+
97+
8698
echo "Platform: $platform"
87-
99+
100+
88101
pattern="s/^VERSION = [\"']\(.*\)[\"']/VERSION = \"\1.dev$version\"/"
89-
102+
103+
90104
if [ "${platform}" == "MSYS_NT-10.0" ]; then
91105
# On preview version of sh build task, the script will pick up the wrong version of find.exe
92106
find="C:\Program Files\Git\usr\bin\find.exe"
93107
else
94108
find="find"
95109
fi
96110

111+
112+
97113
for each in $("${find}" . -name setup.py); do
98114
if [ "$platform" == "Darwin" ]; then
99115
sed -i "" "${pattern}" "${each}"

0 commit comments

Comments
 (0)