FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
azure-devops-python-api/scripts/ci/version.sh at master · microsoft/azure-devops-python-api · GitHub
microsoft
/
azure-devops-python-api
Public
Notifications
You must be signed in to change notification settings
Fork
218
Star
683
Code
Issues
143
Pull requests
13
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
azure-devops-python-api
/
scripts
/
ci
/
version.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (40 loc) · 1.26 KB
Breadcrumbs
azure-devops-python-api
/
scripts
/
ci
/
version.sh
Copy path
File metadata and controls
53 lines (40 loc) · 1.26 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!
/usr/bin/env bash
#
Update the version strings in the source code
#
Input:
#
$1 - the version string, if omitted, use ${BUILD_BUILDID}
version=
$1
if
[
-z
${version}
]
;
then
version=
`
expr match
"
${BUILD_BUILDID}
"
'
\([0-9]*\)
'
`
fi
if
[
-z
${version}
]
;
then
echo
'
Missing version string
'
exit
1
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}
"
rc=
$?
;
if
[[
${rc}
!=
0 ]]
;
then
exit
${rc}
;
fi
else
sed -i
"
${pattern}
"
"
${each}
"
rc=
$?
;
if
[[
${rc}
!=
0 ]]
;
then
exit
${rc}
;
fi
fi
done
for
each
in
$(
"
${find}
"
.
-name version.py
)
;
do
if
[
"
$platform
"
==
"
Darwin
"
]
;
then
sed -i
"
"
"
${pattern}
"
"
${each}
"
rc=
$?
;
if
[[
${rc}
!=
0 ]]
;
then
exit
${rc}
;
fi
else
sed -i
"
${pattern}
"
"
${each}
"
rc=
$?
;
if
[[
${rc}
!=
0 ]]
;
then
exit
${rc}
;
fi
fi
done
Back
|
FazBrowse Home
|
New Git URL