Skip to content

Commit 4186f3a

Browse files
committed
fix aspnetcore build failures
* fix NU1102 by updating the <MicrosoftNETCoreAppRuntimeVersion> to the currently built runtime version of nupkg * change path from where the aspnetcore-runtime-*.tar.gz is copied from * update the build parameters introduced here :- dotnet/aspnetcore#58612
1 parent 5975016 commit 4186f3a

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

dotnet-build

+18-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function build_runtime {
8484
"artifacts/packages/$runtime_conf/Shipping/dotnet-runtime-$runtime_version-linux-$ARCH.tar.gz" \
8585
"$DOWNLOADDIR/Runtime/$aspnetcore_transport_version/dotnet-runtime-$aspnetcore_runtime_version-linux-$ARCH.tar.gz"
8686
cp "artifacts/packages/$runtime_conf/Shipping/dotnet-runtime-$runtime_version-linux-$ARCH.tar.gz" "$OUTPUTDIR"
87-
cp "artifacts/packages/$runtime_conf/Shipping/dotnet-runtime-symbols-linux-$ARCH-$runtime_version.tar.gz" "$OUTPUTDIR"
87+
#cp "artifacts/packages/$runtime_conf/Shipping/dotnet-runtime-symbols-linux-$ARCH-$runtime_version.tar.gz" "$OUTPUTDIR"
8888
cp "artifacts/packages/$runtime_conf/Shipping/Microsoft.NETCore.App.Host.linux-$ARCH.$runtime_version.nupkg" "$OUTPUTDIR"
8989
cp "artifacts/packages/$runtime_conf/Shipping/Microsoft.NETCore.App.Runtime.linux-$ARCH.$runtime_version.nupkg" "$OUTPUTDIR"
9090
if [ "$runtime_major_version" -lt 9 ]; then
@@ -204,7 +204,8 @@ function build_aspnetcore {
204204
--ci
205205
--configuration "$aspnetcore_conf"
206206
--pack
207-
"/p:DotNetAssetRootUrl=file://$DOWNLOADDIR/"
207+
"/p:PublicBaseURL=file://$DOWNLOADDIR/"
208+
"/p:MicrosoftNETCoreAppRuntimeVersion=$runtime_version"
208209
)
209210
if [ "$aspnetcore_build_id" != "" ]; then
210211
aspnetcore_build_flags+=(
@@ -229,6 +230,11 @@ function build_aspnetcore {
229230
cp "$DOWNLOADDIR/Runtime/$aspnetcore_transport_version/dotnet-runtime-$aspnetcore_runtime_version-linux-$ARCH.tar.gz" \
230231
artifacts/obj/Microsoft.AspNetCore.App.Runtime/
231232
fi
233+
#Make changes to aspnetcore to use currently built runtime tar.gz
234+
if [$runtime_major_version -gt 9]; then
235+
sed -i \
236+
"s|<DotNetRuntimeDownloadPath>.*</DotNetRuntimeDownloadPath>|<DotNetRuntimeDownloadPath>Runtime/\$(MicrosoftNETCoreAppRuntimeVersion)/\$(DotNetRuntimeArchiveFileName)</DotNetRuntimeDownloadPath>|"\ src/Framework/App.Runtime/src/aspnetcore-runtime-composite.proj src/Framework/App.Runtime/src/aspnetcore-runtime.proj
237+
fi
232238
# Run build script multiple times to work around yarn race condition
233239
for i in $(seq 1 3); do
234240
if ./eng/build.sh "${aspnetcore_build_flags[@]}"; then
@@ -248,9 +254,17 @@ function build_aspnetcore {
248254
if [ -e "$spa_templates" ]; then
249255
cp "$spa_templates" "$PACKAGESDIR"
250256
fi
251-
aspnetcore_tgz=artifacts/installers/$aspnetcore_conf/aspnetcore-runtime-internal-$ASPNETCORE_VERSION-linux-$ARCH.tar.gz
257+
if [ "$aspnetcore_major_version" -lt 10 ]; then
258+
aspnetcore_tgz=artifacts/installers/$aspnetcore_conf/aspnetcore-runtime-internal-$ASPNETCORE_VERSION-linux-$ARCH.tar.gz
259+
else
260+
aspnetcore_tgz=artifacts/packages/$aspnetcore_conf/Shipping/aspnetcore-runtime-internal-$ASPNETCORE_VERSION-linux-$ARCH.tar.gz
261+
fi
252262
if [ ! -e "$aspnetcore_tgz" ]; then
253-
aspnetcore_tgz=artifacts/installers/$aspnetcore_conf/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-$ARCH.tar.gz
263+
if [ "$aspnetcore_major_version" -lt 10 ]; then
264+
aspnetcore_tgz=artifacts/installers/$aspnetcore_conf/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-$ARCH.tar.gz
265+
else
266+
aspnetcore_tgz=artifacts/packages/$aspnetcore_conf/Shipping/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-$ARCH.tar.gz
267+
fi
254268
fi
255269
mkdir -p "$DOWNLOADDIR/aspnetcore/Runtime/$aspnetcore_internal_version"
256270
cp "$aspnetcore_tgz" "$DOWNLOADDIR/aspnetcore/Runtime/$aspnetcore_internal_version"

0 commit comments

Comments
 (0)