Skip to content

Commit 818876e

Browse files
Changes made in dotnet-bump:
-Switching to using dotnet/dotnet repository for SDK versions greater than 10.0.0-preview.4 -Updated the source for dependent repository commits: now retrieved from src/manifest.json instead of productCommit-linux-x64.txt. Changes in dotnet-build: - The build parameter /p:MicrosoftNETCoreAppRuntimeVersion in build_aspnetcore has been changed to /p:MicrosoftNETCoreAppRefVersion. Refer to the supporting pr:dotnet/aspnetcore#61860 - The build parameter /p:Architecture in build_sdk has been renamed to /p:TargetArchitecture. Refer to the pr: dotnet/sdk#47977 - The architecture specific property values has been changed in build_sdk Refer to pr: dotnet/sdk#49017 Signed-off-by: shreya <raoshreya412@gmail.com>
1 parent f3a717b commit 818876e

File tree

2 files changed

+106
-26
lines changed

2 files changed

+106
-26
lines changed

dotnet-build

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ function build_sdk {
164164
--ci
165165
--pack
166166
--configuration "$SDK_CONF"
167-
"/p:Architecture=$ARCH"
168167
"/p:HostRid=linux-x64"
169168
"/p:BundleRuntimePacks=true"
170169
"/p:PublicBaseURL=file://$DOWNLOADDIR/"
171170
"/p:CoreSetupBlobRootUrl=file://$DOWNLOADDIR/"
172171
"/p:DotnetToolsetBlobRootUrl=file://$DOWNLOADDIR/"
173172
)
173+
174174
if [ "$sdk_build_id" != "" ]; then
175175
sdk_build_flags+=(
176176
"/p:ContinuousIntegrationBuild=true"
@@ -184,6 +184,18 @@ function build_sdk {
184184
SDK_VERSION=$SDK_VERSION-$sdk_version_suffix
185185
fi
186186
pushd sdk
187+
if git merge-base --is-ancestor e6ec23d HEAD; then
188+
sdk_build_flags+=("/p:TargetArchitecture=$ARCH")
189+
else
190+
sdk_build_flags+=("/p:Architecture=$ARCH")
191+
fi
192+
if git merge-base --is-ancestor 5a42929 HEAD; then
193+
sdk_build_flags+=("/p:MicrosoftAspNetCoreAppRefPackageVersion=$aspnetcore_version"
194+
"/p:MicrosoftNETCoreAppRefPackageVersion=$runtime_version"
195+
"/p:MicrosoftAspNetCoreAppRefInternalPackageVersion=$aspnetcore_internal_version"
196+
"/p:MicrosoftNETCorePlatformsPackageVersion=$runtime_version")
197+
198+
fi
187199
if [ -z ${SKIP_BUILD_SDK+x} ] && [ ! -e .skip-build ]; then
188200
./build.sh "${sdk_build_flags[@]}"
189201
fi
@@ -209,10 +221,10 @@ function build_aspnetcore {
209221
if [ "$runtime_major_version" -gt 9 ]; then
210222
aspnetcore_build_flags+=(
211223
"/p:PublicBaseURL=file://$DOWNLOADDIR/"
212-
"/p:MicrosoftNETCoreAppRuntimeVersion=$runtime_version"
213224
"/p:DotNetRuntimeDownloadPath=Runtime/$runtime_version/dotnet-runtime-$runtime_version-linux-$ARCH.tar.gz"
214225
)
215226
fi
227+
216228
if [ "$aspnetcore_build_id" != "" ]; then
217229
aspnetcore_build_flags+=(
218230
"/p:ContinuousIntegrationBuild=true"
@@ -226,6 +238,14 @@ function build_aspnetcore {
226238
aspnetcore_build_flags+=(-arch "$ARCH")
227239
fi
228240
pushd aspnetcore
241+
if [ "$runtime_major_version" -gt 9 ]; then
242+
if [ "$runtime_major_version" -gt 9 ]; then
243+
aspnetcore_build_flags+=("/p:MicrosoftNETCoreAppRefVersion=$runtime_version")
244+
else
245+
aspnetcore_build_flags+=("/p:MicrosoftNETCoreAppRuntimeVersion=$runtime_version")
246+
fi
247+
fi
248+
229249
if [ -z ${SKIP_BUILD_ASPNETCORE+x} ] && [ ! -e .skip-build ]; then
230250
# Since commit 243f90d0bec5 ("Use Arcade's DownloadFiles task (#46039)")
231251
# aspnetcore no longer supports downloading runtime from custom URLs.

dotnet-bump

Lines changed: 84 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,24 @@ if [ $# -gt 0 ]; then
6666
shift
6767
fi
6868
git submodule update --init --recursive
69-
cd sdk
69+
#cd sdk
7070
if [[ -z ${sdk_version+x} ]]; then
7171
url=https://aka.ms/dotnet/$platform/daily/productCommit-linux-x64.txt
7272
else
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
7474
fi
7575
manifest=$(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
8887
repos=(
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

133193
git add dotnet-versions
134194
git commit --allow-empty --message="v$sdk_version" --signoff

0 commit comments

Comments
 (0)