This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,26 @@ usage()
1010 exit 1
1111}
1212
13+ initHostDistroRid ()
14+ {
15+ __HostDistroRid=" "
16+ if [ " $__HostOS " == " Linux" ]; then
17+ if [ -e /etc/os-release ]; then
18+ source /etc/os-release
19+ __HostDistroRid=" $ID .$VERSION_ID -$__HostArch "
20+ elif [ -e /etc/redhat-release ]; then
21+ local redhatRelease=$( < /etc/redhat-release)
22+ if [[ $redhatRelease == " CentOS release 6." * || $redhatRelease == " Red Hat Enterprise Linux Server release 6." * ]]; then
23+ __HostDistroRid=" rhel.6-$__HostArch "
24+ fi
25+ fi
26+ fi
27+
28+ if [ " $__HostDistroRid " == " " ]; then
29+ echo " WARNING: Can not determine runtime id for current distro."
30+ fi
31+ }
32+
1333__ProjectRoot=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
1434__IsPortableBuild=1
1535
@@ -88,7 +108,9 @@ if [ $__IsPortableBuild == 1 ]; then
88108 export __DistroRid=" osx-$__Arch "
89109 fi
90110else
91- export __DistroRid=" \$ {OSRid}-$__Arch "
111+ # init the host distro name
112+ initHostDistroRid
113+ export __DistroRid=" $__HostDistroRid "
92114fi
93115
94116$__ProjectRoot /run.sh build-packages -Project=$__ProjectRoot /src/.nuget/packages.builds -DistroRid=$__DistroRid -UseSharedCompilation=false -BuildNugetPackage=false $unprocessedBuildArgs
You can’t perform that action at this time.
0 commit comments