@@ -66,25 +66,24 @@ if [ $# -gt 0 ]; then
6666 shift
6767fi
6868git submodule update --init --recursive
69- cd sdk
69+ # cd sdk
7070if [[ -z ${sdk_version+x} ]]; then
7171 url=https://aka.ms/dotnet/$platform /daily/productCommit-linux-x64.txt
7272else
73- url=https://ci.dot.net/public /Sdk/$sdk_version /productCommit-linux-x64.txt
73+ url=https://builds.dotnet.microsoft.com/dotnet /Sdk/$sdk_version /productCommit-linux-x64.txt
7474fi
7575manifest=$( curl -L " $url " )
7676# installer:e0c95ad21e5eac311e454c65335008161b3e4763, 7.0.103
7777# installer_commit="c8d103ed3c46cca9bb78098da723037e2be73bce" installer_version="8.0.100-alpha.1.23061.8"
78- if [[ " $manifest " =~ sdk:([0-9a-f]+),\ ([^[:space:]]+) ]] ||
79- [[ " $manifest " =~ sdk_commit= \" ([0-9a-f]+)\"\ sdk_version= \" ([^\" ]+)\" ]]; then
80- sdk_sha=${BASH_REMATCH[1]}
81- sdk_version=${BASH_REMATCH[2]}
82- git fetch --tags
83- git checkout --force " $sdk_sha "
84- else
85- git fetch --tags
86- git checkout --force " v$sdk_version "
87- fi
78+ commits=($( echo " $manifest " | grep -oE ' (_commit="|sdk:)[0-9a-f]+' | grep -oE ' [0-9a-f]+$' ) )
79+ ref=${commits[0]}
80+ all_same=true
81+ for c in " ${commits[@]} " ; do
82+ if [[ " $c " != " $ref " ]]; then
83+ all_same=false
84+ break
85+ fi
86+ done
8887repos=(
8988 runtime:sdk:Microsoft.NETCore.App.Ref:true
9089 msbuild:sdk:Microsoft.Build:true
@@ -94,10 +93,61 @@ repos=(
9493 aspnetcore_internal:sdk:Microsoft.AspNetCore.App.Ref.Internal:false
9594 templating:sdk:Microsoft.TemplateEngine.Abstractions:true
9695)
97- cd ..
98- echo_version sdk " $sdk_version " > dotnet-versions
99- git add sdk
100- for repo in " ${repos[@]} " ; do
96+
97+ if $all_same ; then
98+ cd dotnet
99+ git checkout $ref
100+ commit_sha=$( grep -A3 ' "path": "sdk"' src/source-manifest.json | grep -oP ' "commitSha":\s*"\K[^"]+' )
101+ sdk_version=$( echo " $manifest " | grep -oP ' sdk_version="\K[^"]+' )
102+ runtime_version=$( echo " $manifest " | grep -oP ' runtime_version="\K[^"]+' )
103+ aspnetcore_version=$( echo " $manifest " | grep -oP ' aspnetcore_version="\K[^"]+' )
104+ sdk_version=$( echo " $manifest " | grep -oP ' sdk_version="\K[^"]+' )
105+ templating_version=$sdk_version
106+ cd ..
107+ xpath=" string(/Dependencies/ProductDependencies/Dependency[@Name='Microsoft.Build']/@Version)"
108+ msbuild_version=$( xmllint --xpath " $xpath " sdk/eng/Version.Details.xml)
109+ roslyn_version=$sdk_version
110+ aspnetcore_internal_version=$aspnetcore_version
111+ cd sdk
112+ git fetch --tags
113+ git checkout --force " $commit_sha "
114+ cd ..
115+ echo_version sdk " $sdk_version " > dotnet-versions
116+ git add sdk
117+ for repo in " ${repos[@]} " ; do
118+ IFS=: read -r -a path_name <<< " $repo"
119+ if " ${path_name[3]} " ; then
120+ cd " ${path_name[0]} "
121+ git fetch --tags
122+ sha=$( grep -A3 " \" path\" : \" $repo_path \" " dotnet/src/source-manifest.json | grep ' "commitSha"' | awk -F' "' ' {print $4}' )
123+ git checkout --force $sha
124+ cd ..
125+ git add " ${path_name[0]} "
126+ fi
127+ # echo_version "${path_name[0]}" "$version" >>dotnet-versions
128+ ver_name=" ${path_name[0]} _version"
129+ echo_version " ${path_name[0]} " " ${! ver_name} " >> dotnet-versions
130+
131+ done
132+ else
133+ if [[ " $manifest " =~ sdk:([0-9a-f]+),\ ([^[:space:]]+) ]] ||
134+ [[ " $manifest " =~ sdk_commit= \" ([0-9a-f]+)\"\ sdk_version= \" ([^\" ]+)\" ]]; then
135+ sdk_sha=${BASH_REMATCH[1]}
136+ sdk_version=${BASH_REMATCH[2]}
137+ cd sdk
138+ git fetch --tags
139+ git checkout --force " $sdk_sha "
140+ else
141+ git fetch --tags
142+ git checkout --force " v$sdk_version "
143+ fi
144+
145+
146+
147+ cd ..
148+ echo_version sdk " $sdk_version " > dotnet-versions
149+ git add sdk
150+ for repo in " ${repos[@]} " ; do
101151 IFS=: read -r -a path_name <<< " $repo"
102152 xpath=" string(/Dependencies/ProductDependencies/Dependency[@Name=\" ${path_name[2]} \" ]/@Version)"
103153 version=$( xmllint --xpath " $xpath " " ${path_name[1]} " /eng/Version.Details.xml)
@@ -111,24 +161,34 @@ for repo in "${repos[@]}"; do
111161 git add " ${path_name[0]} "
112162 fi
113163 echo_version " ${path_name[0]} " " $version " >> dotnet-versions
114- done
164+ done
165+ fi
166+
167+
115168
116169{
117170 echo_property \
118171 aspnetcore_transport_version \
119172 aspnetcore/eng/Versions.props \
120173 MicrosoftNETCoreBrowserDebugHostTransportVersion
174+ if $all_same ; then
175+ echo_property \
176+ aspnetcore_runtime_version \
177+ aspnetcore/eng/Versions.props \
178+ MicrosoftNETCoreAppRefVersion
121179
122- echo_property \
123- aspnetcore_runtime_version \
124- aspnetcore/eng/Versions.props \
125- MicrosoftNETCoreAppRuntimeVersion
180+ else
181+ echo_property \
182+ aspnetcore_runtime_version \
183+ aspnetcore/eng/Versions.props \
184+ MicrosoftNETCoreAppRuntimeVersion
185+ fi
126186
127187 echo_property \
128- runtime_version_label \
129- runtime/eng/Versions.props \
188+ runtime_version_label \
189+ runtime/eng/Versions.props \
130190 PreReleaseVersionLabel
131- } >> dotnet-versions
191+ } >> dotnet-versions
132192
133193git add dotnet-versions
134194git commit --allow-empty --message=" v$sdk_version " --signoff
0 commit comments