diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 002d03d43..f204c983b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,46 +1,46 @@ - + https://github.com/dotnet/windowsdesktop - 62f733fe7abacbfc657b606eebd6844494cfc69a + e7f7d8614a816eebf1a5447a3b5e1ca77b38f6d5 - + https://github.com/dotnet/windowsdesktop - 62f733fe7abacbfc657b606eebd6844494cfc69a + e7f7d8614a816eebf1a5447a3b5e1ca77b38f6d5 - + https://github.com/dotnet/windowsdesktop - 62f733fe7abacbfc657b606eebd6844494cfc69a + e7f7d8614a816eebf1a5447a3b5e1ca77b38f6d5 - + https://github.com/dotnet/windowsdesktop - 62f733fe7abacbfc657b606eebd6844494cfc69a + e7f7d8614a816eebf1a5447a3b5e1ca77b38f6d5 - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c @@ -48,93 +48,93 @@ https://github.com/dotnet/core-setup 7d57652f33493fa022125b7f63aad0d70c52d810 - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 - + https://github.com/dotnet/aspnetcore - d4be4957c24c7c8b745ade4cbaf290ad9cad1ad2 + acdfabbc111dee9ad3e5dbbea9e3c026c3b562b1 https://github.com/dotnet/test-templates 0385265f4d0b6413d64aea0223172366a9b9858c - + https://github.com/dotnet/test-templates - 71521455de1aec62a85e1c4e28c7286f5a941b53 + 5a41781eb69eb4721e736a99262dbd32b6bb55d4 - + https://github.com/dotnet/test-templates - 71521455de1aec62a85e1c4e28c7286f5a941b53 + 5a41781eb69eb4721e736a99262dbd32b6bb55d4 - + https://github.com/dotnet/test-templates - 71521455de1aec62a85e1c4e28c7286f5a941b53 + 5a41781eb69eb4721e736a99262dbd32b6bb55d4 - + https://github.com/dotnet/test-templates - 71521455de1aec62a85e1c4e28c7286f5a941b53 + 5a41781eb69eb4721e736a99262dbd32b6bb55d4 - + https://github.com/dotnet/sdk - d2d4bf5e37b72b21c94a60a33f70f3b107b2fead + 96f4e06b4d579146332607aa2fe83113e24efaa4 - + https://github.com/dotnet/sdk - d2d4bf5e37b72b21c94a60a33f70f3b107b2fead + 96f4e06b4d579146332607aa2fe83113e24efaa4 - + https://github.com/dotnet/sdk - d2d4bf5e37b72b21c94a60a33f70f3b107b2fead + 96f4e06b4d579146332607aa2fe83113e24efaa4 - + https://github.com/dotnet/sdk - d2d4bf5e37b72b21c94a60a33f70f3b107b2fead + 96f4e06b4d579146332607aa2fe83113e24efaa4 - + https://github.com/dotnet/winforms - f777662b7d00d81e52255e3c3b699f401eaaea6c + d5c99d71d02787c42753807e2271d42a01d5b2ca - + https://github.com/dotnet/wpf - 08940fbba6aed7b0edafb00914691035cf71cc7d + 599cce2fff315dd2c6d712436e890837cdc3ff3e - + https://github.com/dotnet/fsharp - 93562c0c97dda1fb131e8eaf73e35487a6998ee5 + 15e94b3cb730ed90d454141e0d4c10a28d9efe1d - + https://github.com/dotnet/fsharp - 93562c0c97dda1fb131e8eaf73e35487a6998ee5 + 15e94b3cb730ed90d454141e0d4c10a28d9efe1d @@ -142,23 +142,23 @@ 2d656fe2133f89248825419fb8ffac5505486906 - + https://github.com/dotnet/runtime - beb708f6fe999cbbe5542846c9985ce596569097 + 958b1e046cbfff5c0bc647f531b4fcf9eb197a6c https://github.com/dotnet/roslyn 542fea0c2a93aacb3e8c52c2ce43e975d29832f3 - + https://github.com/dotnet/msbuild - e7de1330724224a542668e1ef82c997613c7080c + 413571dea9ebb0023f26e5c0f5cd514d30b61465 - + https://github.com/nuget/nuget.client - 80c3c74ca5c6d67912a19833e8cc2b10f875dc95 + 0fa557836fa35aee7d60776ef0c88176dbcd22ac @@ -218,9 +218,9 @@ https://github.com/dotnet/runtime af841c8b33cecc92d74222298f1e45bf7bf3d90a - + https://github.com/dotnet/source-build-reference-packages - f9dc7282be60127425b58b40972374cdec0348ed + 09c4d8e93c5b78897bccb4f27e0c373647fb3985 diff --git a/eng/Versions.props b/eng/Versions.props index ea10440fc..f51ea8e77 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -41,11 +41,11 @@ - 8.0.0-preview.4.23172.4 + 8.0.0-preview.4.23177.3 - 8.0.0-preview.4.23177.1 + 8.0.0-preview.4.23178.1 @@ -54,10 +54,10 @@ 1.0.2-beta4.22406.1 1.1.0-rc.22558.1 - 1.1.0-rc.23181.3 - 1.1.0-rc.23181.3 - 1.1.0-rc.23181.3 - 1.1.0-rc.23181.3 + 1.1.0-rc.23204.1 + 1.1.0-rc.23204.1 + 1.1.0-rc.23204.1 + 1.1.0-rc.23204.1 @@ -65,22 +65,22 @@ - 8.0.0-preview.4.23177.14 - 8.0.0-preview.4.23177.14 - 8.0.0-preview.4.23177.14 - 8.0.0-preview.4.23177.14 - 8.0.0-preview.4.23177.14 - 8.0.0-preview.4.23177.14 - 8.0.0-preview.4.23177.14 + 8.0.0-preview.4.23205.3 + 8.0.0-preview.4.23205.3 + 8.0.0-preview.4.23205.3 + 8.0.0-preview.4.23205.3 + 8.0.0-preview.4.23205.3 + 8.0.0-preview.4.23205.3 + 8.0.0-preview.4.23205.3 0.2.0 - 8.0.100-preview.4.23178.2 - 8.0.100-preview.4.23178.2 - 8.0.100-preview.4.23178.2 + 8.0.100-preview.4.23205.14 + 8.0.100-preview.4.23205.14 + 8.0.100-preview.4.23205.14 $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) $(MicrosoftNETSdkPackageVersion) @@ -91,24 +91,24 @@ - 8.0.0-preview.4.23177.1 + 8.0.0-preview.4.23181.2 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 + 8.0.0-preview.4.23181.2 + 8.0.0-preview.4.23181.2 + 8.0.0-preview.4.23181.2 + 8.0.0-preview.4.23181.2 + 8.0.0-preview.4.23181.2 + 8.0.0-preview.4.23181.2 2.1.0 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 - 8.0.0-preview.4.23177.1 + 8.0.0-preview.4.23178.3 + 8.0.0-preview.4.23178.3 + 8.0.0-preview.4.23178.3 + 8.0.0-preview.4.23178.3 diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 77be79eb2..77b477c25 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -106,9 +106,8 @@ jobs: - ${{ if parameters.buildFromArchive }}: - script: | set -ex - "${{ parameters.vmrPath }}/eng/pack-sources.sh" -o "$(Build.StagingDirectory)/dotnet-sources.tar.gz" - tar -xf dotnet-sources.tar.gz - mv "dotnet-$(Build.SourceVersion)" "$(sourcesPath)" + cp -r "${{ parameters.vmrPath }}" "$(sourcesPath)" + rm -rf "$(sourcesPath)/.git" displayName: Export VMR sources workingDirectory: $(Build.StagingDirectory) @@ -127,7 +126,9 @@ jobs: - ${{ if ne(parameters.reuseBuildArtifactsFrom, '') }}: - download: current artifact: ${{ parameters.reuseBuildArtifactsFrom }}_${{ parameters.architecture }}_Artifacts - patterns: '*.tar.gz' + patterns: | + **/Private.SourceBuilt.Artifacts.*.tar.gz + **/dotnet-sdk-*.tar.gz displayName: Download Previous Build - task: CopyFiles@2 @@ -182,7 +183,12 @@ jobs: echo "##vso[task.setvariable variable=additionalBuildArgs]--with-sdk /vmr/.dotnet" fi - docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${{ parameters.container }} ./prep.sh ${customPrepArgs} + if [[ '${{ parameters.buildFromArchive }}' == 'True' ]]; then + customPrepArgs="$customPrepArgs --source-repository https://github.com/dotnet/dotnet" + customPrepArgs="$customPrepArgs --source-version $(git -C "${{ parameters.vmrPath }}" rev-parse HEAD)" + fi + + docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${{ parameters.container }} ./prep.sh $customPrepArgs displayName: Prep the Build - script: | @@ -207,7 +213,7 @@ jobs: customBuildArgs="$customBuildArgs --poison" fi - docker run --rm -v "$(sourcesPath):/vmr" -w /vmr ${customRunArgs} ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) ${customBuildArgs} + docker run --rm -v "$(sourcesPath):/vmr" -w /vmr $customRunArgs ${{ parameters.container }} ./build.sh --clean-while-building $(additionalBuildArgs) $customBuildArgs displayName: Build - script: | diff --git a/src/SourceBuild/content/.devcontainer/synchronize-vmr.sh b/src/SourceBuild/content/.devcontainer/synchronize-vmr.sh old mode 100644 new mode 100755 diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh index 6fdf14c10..f797bab62 100755 --- a/src/SourceBuild/content/build.sh +++ b/src/SourceBuild/content/build.sh @@ -113,6 +113,11 @@ if [ -f "${packagesArchiveDir}archiveArtifacts.txt" ]; then fi fi +if [ ! -d "$SCRIPT_ROOT/.git" ]; then + echo "ERROR: $SCRIPT_ROOT is not a git repository. Please run prep.sh add initialize Source Link metadata." + exit 1 +fi + if [ -d "$CUSTOM_SDK_DIR" ]; then export SDK_VERSION=$("$CUSTOM_SDK_DIR/dotnet" --version) export CLI_ROOT="$CUSTOM_SDK_DIR" diff --git a/src/SourceBuild/content/eng/pack-sources.sh b/src/SourceBuild/content/eng/pack-sources.sh deleted file mode 100755 index ecb2c8920..000000000 --- a/src/SourceBuild/content/eng/pack-sources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env bash - -### This script exports the sources of VMR (dotnet/dotnet) as an archive that can be used -### to build the .NET SDK. -### It expects you clone the dotnet/dotnet repo locally and check out the desired revision. -### -### USAGE: -### ./pack-sources.sh -o dotnet.tar.gz -### Options: -### -o, --output PATH -### Optional. Path or dir where the archive is created. -### Defaults to artifacts/packages/dotnet-[SHA].tar.gz - -source="${BASH_SOURCE[0]}" - -# resolve $source until the file is no longer a symlink -while [[ -h "$source" ]]; do - scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - source="$(readlink "$source")" - # if $source was a relative symlink, we need to resolve it relative to the path where the - # symlink file was located - [[ $source != /* ]] && source="$scriptroot/$source" -done -scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" - -function print_help () { - sed -n '/^### /,/^$/p' "$source" | cut -b 5- -} - -GIT_ROOT=$(realpath "$scriptroot/../") - -output='' - -while [[ $# -gt 0 ]]; do - opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")" - case "$opt" in - -o|--output) - output=$2 - shift - ;; - -h|--help) - print_help - exit 0 - ;; - *) - fail "Invalid argument: $1" - usage - exit 1 - ;; - esac - - shift -done - -revision=$(git -C "$GIT_ROOT" rev-parse HEAD) -filename="dotnet-$revision" - -if [[ -z "$output" ]]; then - output="$GIT_ROOT/artifacts/packages/$filename.tar.gz" -fi - -# If output is directory, use the default filename -if [[ -d "$output" ]]; then - output="$output/$filename.tar.gz" -fi - -set -e - -echo "Packing sources of $revision to $output.." -mkdir -p "$(dirname "$output")" -rm -f "$output" - -tmp="$GIT_ROOT/artifacts/tmp" -mkdir -p "$tmp" -config_file="$tmp/config" -HEAD_file="$tmp/HEAD" - -start_time=$(date +%s) - -# We need to had `.git/HEAD` and `.git/config` to the archive as the build expects those -echo $'[remote "origin"]\nurl="http://github.com/dotnet/dotnet"' > "$config_file" -echo "$revision" > "$HEAD_file" - -git -C "$GIT_ROOT" archive \ - -o "$output" \ - --prefix "$filename/.git/" \ - --add-file "$config_file" \ - --add-file "$HEAD_file" \ - --prefix "$filename/" \ - "$revision" "$GIT_ROOT" - -end_time=$(date +%s) -elapsed=$(( end_time - start_time )) - -duration=$(date -u +%H:%M:%S "-d@$elapsed") -echo "Archive created in $duration" diff --git a/src/SourceBuild/content/prep.sh b/src/SourceBuild/content/prep.sh index bbe545d0d..df8f88cc0 100755 --- a/src/SourceBuild/content/prep.sh +++ b/src/SourceBuild/content/prep.sh @@ -10,10 +10,12 @@ usage() { echo " Prepares the environment to be built by downloading Private.SourceBuilt.Artifacts.*.tar.gz and" echo " installing the version of dotnet referenced in global.json" echo "options:" - echo " --no-artifacts Exclude the download of the previously source-built artifacts archive." + echo " --no-artifacts Exclude the download of the previously source-built artifacts archive" echo " --no-bootstrap Don't replace portable packages in the download source-built artifacts" - echo " --no-prebuilts Exclude the download of the prebuilts archive." - echo " --no-sdk Exclude the download of the .NET SDK." + echo " --no-prebuilts Exclude the download of the prebuilts archive" + echo " --no-sdk Exclude the download of the .NET SDK" + echo " --source-repository Source Link repository URL, required when building from tarball" + echo " --source-version Source Link revision, required when building from tarball" echo " --runtime-source-feed URL of a remote server or a local directory, from which SDKs and" echo " runtimes can be downloaded" echo " --runtime-source-feed-key Key for accessing the above server, if necessary" @@ -24,8 +26,10 @@ buildBootstrap=true downloadArtifacts=true downloadPrebuilts=true installDotnet=true -runtime_source_feed='' -runtime_source_feed_key='' +sourceUrl='' +sourceVersion='' +runtime_source_feed='' # IBM requested these to support s390x scenarios +runtime_source_feed_key='' # IBM requested these to support s390x scenarios positional_args=() while :; do if [ $# -le 0 ]; then @@ -49,6 +53,14 @@ while :; do --no-sdk) installDotnet=false ;; + --source-repository) + sourceUrl="$2" + shift + ;; + --source-version) + sourceVersion="$2" + shift + ;; --runtime-source-feed) runtime_source_feed=$2 shift @@ -67,57 +79,75 @@ done # Attempting to bootstrap without an SDK will fail. So either the --no-sdk flag must be passed # or a pre-existing .dotnet SDK directory must exist. -if [[ "$buildBootstrap" == "true" && "$installDotnet" == "false" && ! -d $SCRIPT_ROOT/.dotnet ]]; then +if [ "$buildBootstrap" == true ] && [ "$installDotnet" == false ] && [ ! -d "$SCRIPT_ROOT/.dotnet" ]; then echo " ERROR: --no-sdk requires --no-bootstrap or a pre-existing .dotnet SDK directory. Exiting..." - exit -1 + exit 1 fi # Check to make sure curl exists to download the archive files if ! command -v curl &> /dev/null then echo " ERROR: curl not found. Exiting..." - exit -1 + exit 1 +fi + +GIT_DIR="$SCRIPT_ROOT/.git" +if [ -f "$GIT_DIR/index" ]; then # We check for index because if outside of git, we create config and HEAD manually + if [ -n "$sourceUrl" ] || [ -n "$sourceVersion" ]; then + echo "ERROR: $SCRIPT_ROOT is a git repository, --source-repository and --source-version cannot be used." + exit 1 + fi +else + if [ -z "$sourceUrl" ] || [ -z "$sourceVersion" ]; then + echo "ERROR: $SCRIPT_ROOT is not a git repository, --source-repository and --source-version must be specified." + exit 1 + fi + + # We need to add "fake" .git/ files when not building from a git repository + mkdir -p "$GIT_DIR" + echo '[remote "origin"]' > "$GIT_DIR/config" + echo "url=\"$sourceUrl\"" >> "$GIT_DIR/config" + echo "$sourceVersion" > "$GIT_DIR/HEAD" fi # Check if Private.SourceBuilt artifacts archive exists artifactsBaseFileName="Private.SourceBuilt.Artifacts" packagesArchiveDir="$SCRIPT_ROOT/prereqs/packages/archive/" -if [ "$downloadArtifacts" == "true" ] && [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then +if [ "$downloadArtifacts" == true ] && [ -f ${packagesArchiveDir}${artifactsBaseFileName}.*.tar.gz ]; then echo " Private.SourceBuilt.Artifacts.*.tar.gz exists...it will not be downloaded" downloadArtifacts=false fi # Check if Private.SourceBuilt prebuilts archive exists prebuiltsBaseFileName="Private.SourceBuilt.Prebuilts" -if [ "$downloadPrebuilts" == "true" ] && [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then +if [ "$downloadPrebuilts" == true ] && [ -f ${packagesArchiveDir}${prebuiltsBaseFileName}.*.tar.gz ]; then echo " Private.SourceBuilt.Prebuilts.*.tar.gz exists...it will not be downloaded" downloadPrebuilts=false fi # Check if dotnet is installed -if [[ "$installDotnet" == "true" && -d $SCRIPT_ROOT/.dotnet ]]; then +if [ "$installDotnet" == true ] && [ -d "$SCRIPT_ROOT/.dotnet" ]; then echo " ./.dotnet SDK directory exists...it will not be installed" installDotnet=false; fi function DownloadArchive { archiveType="$1" - baseFileName="$2" - isRequired="$3" + isRequired="$2" packageVersionsPath="$SCRIPT_ROOT/eng/Versions.props" notFoundMessage="No source-built $archiveType found to download..." echo " Looking for source-built $archiveType to download..." - archiveVersionLine=`grep -m 1 "" "$packageVersionsPath" || :` + archiveVersionLine=$(grep -m 1 "" "$packageVersionsPath" || :) versionPattern="(.*)" if [[ $archiveVersionLine =~ $versionPattern ]]; then archiveUrl="${BASH_REMATCH[1]}" echo " Downloading source-built $archiveType from $archiveUrl..." - (cd $packagesArchiveDir && curl --retry 5 -O $archiveUrl) - elif [ "$isRequired" == "true" ]; then + (cd "$packagesArchiveDir" && curl --retry 5 -O "$archiveUrl") + elif [ "$isRequired" == true ]; then echo " ERROR: $notFoundMessage" - exit -1 + exit 1 else echo " $notFoundMessage" fi @@ -131,39 +161,39 @@ function BootstrapArtifacts { echo " Building bootstrap previously source-built in $workingDir" # Copy bootstrap project to working dir - cp $SCRIPT_ROOT/eng/bootstrap/buildBootstrapPreviouslySB.csproj $workingDir + cp "$SCRIPT_ROOT/eng/bootstrap/buildBootstrapPreviouslySB.csproj" "$workingDir" # Copy NuGet.config from the installer repo to have the right feeds - cp $SCRIPT_ROOT/src/installer/NuGet.config $workingDir + cp "$SCRIPT_ROOT/src/installer/NuGet.config" "$workingDir" # Get PackageVersions.props from existing prev-sb archive echo " Retrieving PackageVersions.props from existing archive" - sourceBuiltArchive=`find $packagesArchiveDir -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz'` + sourceBuiltArchive=$(find "$packagesArchiveDir" -maxdepth 1 -name 'Private.SourceBuilt.Artifacts*.tar.gz') if [ -f "$sourceBuiltArchive" ]; then - tar -xzf "$sourceBuiltArchive" -C $workingDir PackageVersions.props + tar -xzf "$sourceBuiltArchive" -C "$workingDir" PackageVersions.props fi # Run restore on project to initiate download of bootstrap packages - $DOTNET_SDK_PATH/dotnet restore $workingDir/buildBootstrapPreviouslySB.csproj /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$packagesArchiveDir" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/eng/bootstrap/OverrideBootstrapVersions.props" + "$DOTNET_SDK_PATH/dotnet" restore "$workingDir/buildBootstrapPreviouslySB.csproj" /bl:artifacts/prep/bootstrap.binlog /fileLoggerParameters:LogFile=artifacts/prep/bootstrap.log /p:ArchiveDir="$packagesArchiveDir" /p:BootstrapOverrideVersionsProps="$SCRIPT_ROOT/eng/bootstrap/OverrideBootstrapVersions.props" # Remove working directory - rm -rf $workingDir + rm -rf "$workingDir" } # Check for the version of dotnet to install -if [ "$installDotnet" == "true" ]; then +if [ "$installDotnet" == true ]; then echo " Installing dotnet..." (source ./eng/common/tools.sh && InitializeDotNetCli true) fi # Read the eng/Versions.props to get the archives to download and download them -if [ "$downloadArtifacts" == "true" ]; then - DownloadArchive "Artifacts" $artifactsBaseFileName "true" - if [ "$buildBootstrap" == "true" ]; then +if [ "$downloadArtifacts" == true ]; then + DownloadArchive Artifacts true + if [ "$buildBootstrap" == true ]; then BootstrapArtifacts fi fi -if [ "$downloadPrebuilts" == "true" ]; then - DownloadArchive "Prebuilts" $prebuiltsBaseFileName "false" +if [ "$downloadPrebuilts" == true ]; then + DownloadArchive Prebuilts false fi diff --git a/src/SourceBuild/content/repo-projects/diagnostics.proj b/src/SourceBuild/content/repo-projects/diagnostics.proj index 98a136cb5..28145aad0 100644 --- a/src/SourceBuild/content/repo-projects/diagnostics.proj +++ b/src/SourceBuild/content/repo-projects/diagnostics.proj @@ -4,6 +4,7 @@ $(StandardSourceBuildArgs) $(ProjectDirectory)eng\common\build$(ShellExtension) $(BuildCommandArgs) + DependenciesOnly diff --git a/src/SourceBuild/content/repo-projects/emsdk.proj b/src/SourceBuild/content/repo-projects/emsdk.proj index 4f88c9ff4..517720efc 100644 --- a/src/SourceBuild/content/repo-projects/emsdk.proj +++ b/src/SourceBuild/content/repo-projects/emsdk.proj @@ -17,6 +17,8 @@ $(BuildCommandArgs) /p:PlatformName=$(TargetArch) $(BuildCommandArgs) /p:ForceBuildManifestOnly=true $(StandardSourceBuildCommand) $(BuildCommandArgs) + + DependenciesOnly diff --git a/src/VirtualMonoRepo/README.template.md b/src/VirtualMonoRepo/README.template.md index f6d91d55f..5c8bdd06e 100644 --- a/src/VirtualMonoRepo/README.template.md +++ b/src/VirtualMonoRepo/README.template.md @@ -139,11 +139,10 @@ ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet You can also utilize [GitHub Codespaces](https://github.com/features/codespaces) where you can find preset containers in this repository. -### Exporting a source archive +### Building outside of git -In case you'd like to export a more lightweight archive of sources that can be built outside of this git repository, a simple copy of the working tree won't do. -The build is using some git metadata (information from the `.git` directory) that are needed to be kept with the sources. -To export a `tar.gz` archive of the sources, you need to use the `eng/pack-sources.sh` script from within a clone of the VMR checked out at the revision that you're interested in. +.NET uses git metadata so that it can link assemblies to their original source code when debugging (think "Step into.." functionality) and for that it needs information about the original place the code comes from. +When you're building source code only, taken outside of context of a git repository (e.g. you download it from the release page), you will need to specify the source repository to the `prep.sh` script via the `--source-repository` and `--source-version` arguments. This can be your fork of the repository and should match the origin where your SDK was built from. ## List of components