Skip to content

Commit 644067a

Browse files
committed
Some fixups from trying local builds.
1 parent 6492d2a commit 644067a

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

build-source-tarball.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ cp -r $SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/reference-packages/source
285285
cp -r $SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/reference-packages/staging $TARBALL_ROOT/packages/reference/staging
286286

287287
# Copy tarballs to ./packages/archive directory
288-
if [ -d "$SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/external-tarballs" && ! -z "$(find \"$SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/external-tarballs\" -iname '*.tar.gz')" ]; then
288+
if [[ -d "$SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/external-tarballs" && ! -z "$(find $SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/external-tarballs -iname '*.tar.gz')" ]]; then
289289
mkdir -p $TARBALL_ROOT/packages/archive
290290
cp -r $SCRIPT_ROOT/bin/obj/$targetArchitecture/Release/external-tarballs/*.tar.gz $TARBALL_ROOT/packages/archive/
291291
fi

dir.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<PrebuiltPackagesPath>$(ProjectDir)packages/prebuilt/</PrebuiltPackagesPath>
8585
<PreviouslyRestoredPackagesPath>$(ProjectDir)packages/previouslyRestored/</PreviouslyRestoredPackagesPath>
8686
<PrebuiltSourceBuiltPackagesPath>$(ProjectDir)packages/source-built/</PrebuiltSourceBuiltPackagesPath>
87+
<PrebuiltSourceBuiltPackagesPath Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' != ''">$(CustomPrebuiltSourceBuiltPackagesPath)/</PrebuiltSourceBuiltPackagesPath>
8788
<SourceBuiltTarBallPath>$(OutputPath)</SourceBuiltTarBallPath>
8889
<SourceBuiltToolsetDir>$(LocalBlobStorageRoot)Toolset/</SourceBuiltToolsetDir>
8990
<SourceBuiltRuntimeDir>$(LocalBlobStorageRoot)Runtime/</SourceBuiltRuntimeDir>
@@ -135,6 +136,7 @@
135136
<ReferencePackagesStagingDir>$(ReferencePackagesBaseDir)staging/</ReferencePackagesStagingDir>
136137
<ReferencePackagesSourceDir>$(ReferencePackagesBaseDir)source/</ReferencePackagesSourceDir>
137138
<ReferencePackagesDir>$(ReferencePackagesBaseDir)packages/</ReferencePackagesDir>
139+
<ReferencePackagesDir Condition="'$(CustomReferencePackagesPath)' != ''">$(CustomReferencePackagesPath)/</ReferencePackagesDir>
138140
<SourceBuiltArtifactsTarballName>Private.SourceBuilt.Artifacts</SourceBuiltArtifactsTarballName>
139141
<SourceBuiltArtifactsTarballUrl>https://dotnetcli.blob.core.windows.net/source-built-artifacts/assets/</SourceBuiltArtifactsTarballUrl>
140142
<ReferencePackagesTarballName>Private.SourceBuild.ReferencePackages</ReferencePackagesTarballName>

support/tarball/build.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,21 @@ while :; do
2525
lowerI="$(echo $1 | awk '{print tolower($0)}')"
2626
case $lowerI in
2727
--with-ref-packages)
28-
CUSTOM_REF_PACKAGES_DIR="$2"
28+
CUSTOM_REF_PACKAGES_DIR="$(cd -P "$2" && pwd)"
2929
if [ ! -d "$CUSTOM_REF_PACKAGES_DIR" ]; then
3030
echo "Custom reference packages directory '$CUSTOM_REF_PACKAGES_DIR' does not exist"
3131
exit 1
3232
fi
33+
MSBUILD_ARGUMENTS+=( "/p:CustomReferencePackagesPath=$CUSTOM_REF_PACKAGES_DIR" )
3334
shift
3435
;;
3536
--with-packages)
36-
CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR="$2"
37+
CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR="$(cd -P "$2" && pwd)"
3738
if [ ! -d "$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR" ]; then
3839
echo "Custom prviously built packages directory '$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR' does not exist"
3940
exit 1
4041
fi
42+
MSBUILD_ARGUMENTS+=( "/p:CustomPrebuiltSourceBuiltPackagesPath=$CUSTOM_PREVIOUSLY_BUILT_PACKAGES_DIR" )
4143
shift
4244
;;
4345
--)
@@ -55,6 +57,8 @@ while :; do
5557
exit 1
5658
;;
5759
esac
60+
shift
61+
done
5862

5963
sdkLine=`grep -m 1 'dotnet' "$SCRIPT_ROOT/global.json"`
6064
sdkPattern="\"dotnet\" *: *\"(.*)\""
@@ -83,19 +87,19 @@ if [ ! -f "$packageVersionsPath" ]; then
8387
exit 1
8488
fi
8589

86-
arcadeSdkLine=`grep -m 1 'MicrosoftDotNetArcadeSdkVersion' "$packageVersionsPath"
90+
arcadeSdkLine=`grep -m 1 'MicrosoftDotNetArcadeSdkVersion' "$packageVersionsPath"`
8791
versionPattern="<MicrosoftDotNetArcadeSdkVersion>(.*)</MicrosoftDotNetArcadeSdkVersion>"
8892
if [[ $arcadeSdkLine =~ $versionPattern ]]; then
8993
export ARCADE_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
9094
fi
9195

92-
sourceLinkLine=`grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath"
96+
sourceLinkLine=`grep -m 1 'MicrosoftSourceLinkCommonVersion' "$packageVersionsPath"`
9397
versionPattern="<MicrosoftSourceLinkCommonVersion>(.*)</MicrosoftSourceLinkCommonVersion>"
9498
if [[ $sourceLinkLine =~ $versionPattern ]]; then
9599
export SOURCE_LINK_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
96100
fi
97101

98-
dotNetHostLine=`grep -m 1 'MicrosoftNETCoreDotNetHostVersion' "$packageVersionsPath"
102+
dotNetHostLine=`grep -m 1 'MicrosoftNETCoreDotNetHostVersion' "$packageVersionsPath"`
99103
versionPattern="<MicrosoftNETCoreDotNetHostVersion>(.*)</MicrosoftNETCoreDotNetHostVersion>"
100104
if [[ $dotNetHostLine =~ $versionPattern ]]; then
101105
export DOTNET_HOST_BOOTSTRAP_VERSION=${BASH_REMATCH[1]}
@@ -108,7 +112,6 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1
108112
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
109113
export NUGET_PACKAGES="$SCRIPT_ROOT/packages/restored/"
110114

111-
112115
$CLI_ROOT/dotnet $CLI_ROOT/sdk/$SDK_VERSION/MSBuild.dll /bl:BuildXPlatTasks.binlog $SCRIPT_ROOT/tools-local/init-build.proj /t:BuildXPlatTasks ${MSBUILD_ARGUMENTS[@]} "$@"
113116

114117
echo "Rebuild reference assemblies"

tools-local/init-build.proj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
WorkingDirectory="$(PrebuiltSourceBuiltPackagesPath)"
4949
Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' == ''" />
5050

51-
<PropertyGroup>
52-
<PrebuiltSourceBuiltPackagesPath Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' == ''">$(CustomPrebuiltSourceBuiltPackagesPath)</PrebuiltSourceBuiltPackagesPath>
53-
</PropertyGroup>
54-
<PropertyGroup>
55-
<ReferencePackagesDir Condition="'$(CustomReferencePackagesPath)' == ''">$(CustomReferencePackagesPath)</ReferencePackagesDir>
56-
</PropertyGroup>
57-
5851
<Copy SourceFiles="$(PrebuiltSourceBuiltPackagesPath)PackageVersions.props" DestinationFiles="$(IntermediatePath)SourceBuiltPackageVersions.props" />
5952
</Target>
6053

0 commit comments

Comments
 (0)