From 4f67914e3a9883f07af04415728baacfbf77af17 Mon Sep 17 00:00:00 2001 From: John Luo Date: Fri, 2 Jun 2017 20:15:45 -0700 Subject: [PATCH] Re-enable building symbols for runtime store By adding Microsoft.DiaSymReader.Native.*.dll to the path --- .gitignore | 2 + build/repo.targets | 85 ++++++++++++++++++++++------- tools/GetSharedFrameworkVersion.ps1 | 6 ++ tools/zip2tgz.sh | 31 +++++++++++ 4 files changed, 103 insertions(+), 21 deletions(-) create mode 100644 tools/GetSharedFrameworkVersion.ps1 create mode 100755 tools/zip2tgz.sh diff --git a/.gitignore b/.gitignore index 8e80baa565..3af0091ea3 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ global.json # Dependencies from pre-requisite builds .deps/ +.rw/ +.ro/ diff --git a/build/repo.targets b/build/repo.targets index 36ebc010bb..ef5f176ece 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -22,13 +22,15 @@ $(VersionPrefix)-$(OriginalVersionSuffix)-$(NoTimestampSuffix) $(VersionPrefix)-$(OriginalVersionSuffix)-$(BuildNumber) - $(MetaPackagePath)bin\work\ - $(MetaPackagePath)bin\packageCache\ + $(RepositoryRoot).rw\ + $(RepositoryRoot).ro\ $(RepositoryRoot)artifacts\ $(ArtifactsDir)zip\ $(ArtifactsDir)deps\ - $(ArtifactsZipDir)ts\ - $(ArtifactsZipDir)nt\ + $(ArtifactsZipDir)t\ + $(ArtifactsZipDir)n\ + $(ArtifactsZipDir)st\ + $(ArtifactsZipDir)sn\ $(ArtifactsDir)temp\ $(RepositoryRoot)tools\ $(RepositoryRoot).deps\build\ @@ -48,7 +50,7 @@ Condition="Exists('$(DependencyBuildDirectory)')" /> - + @@ -69,6 +71,10 @@ $(ArtifactsDir)Build.RS.$(OutputZipSufix)-$(VersionSuffix).zip $(ArtifactsDir)Build.RS.$(OutputZipSufix).zip + $(ArtifactsDir)Build.Symbols.RS.$(OutputZipSufix)-$(VersionSuffix).zip + $(ArtifactsDir)Build.Symbols.RS.$(OutputZipSufix).zip + $(ArtifactsDir)Build.Symbols.RS.$(OutputZipSufix)-$(VersionSuffix).tar.gz + $(ArtifactsDir)Build.Symbols.RS.$(OutputZipSufix).tar.gz @@ -84,10 +90,10 @@ Condition="Exists('$(RuntimeStoreReferencePackageDirectory)')" /> - - + + - + @@ -97,42 +103,79 @@ - + aspnetcore-store-$(TimestampVersion)-$(RID).xml - <_PackageCacheFiles Include="$(PackageCacheOutputPath)**\*" Exclude="$(PackageCacheOutputPath)**\artifact.xml" /> - + <_RuntimeStoreFiles Include="$(RuntimeStoreOutputPath)**\*" Exclude="$(RuntimeStoreOutputPath)**\artifact.xml;$(RuntimeStoreOutputPath)symbols\**\*" /> + $([System.String]::new('%(RecursiveDir)').Replace('-$(BuildNumber)', '-final')) - + + <_RuntimeStoreSymbolFiles Include="$(RuntimeStoreOutputPath)symbols\**\*" /> + + $([System.String]::new('%(RecursiveDir)').Replace('-$(BuildNumber)', '-final')) + - - - - + + + + + + - + - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + $(DotnetHomeDirectory)shared\Microsoft.NETCore.App\$(SharedFrameworkVersion) + + + + + + + diff --git a/tools/GetSharedFrameworkVersion.ps1 b/tools/GetSharedFrameworkVersion.ps1 new file mode 100644 index 0000000000..9fb7365c08 --- /dev/null +++ b/tools/GetSharedFrameworkVersion.ps1 @@ -0,0 +1,6 @@ +$infoOutput = dotnet --info +$versions = $infoOutput | Select-String -Pattern "version" +$FXVersionRaw = $versions | Select-Object -Last 1 +$FXVersionString = $FXVersionRaw.ToString() +$FXVersion = $FXVersionString.SubString($FXVersionString.IndexOf(':') + 1).Trim() +Write-Host $FXVersion \ No newline at end of file diff --git a/tools/zip2tgz.sh b/tools/zip2tgz.sh new file mode 100755 index 0000000000..15a5cd2a12 --- /dev/null +++ b/tools/zip2tgz.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +if [[ $# < 2 ]]; then + echo "Usage: [src] [dest]" + exit 1 +fi + +function realpath() { + [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" +} + +src="$(realpath $1)" +dest="$(realpath $2)" + +echo "Converting:" +echo " - $src" +echo " => $dest" + +tmp="$(mktemp -d)" +echo "Using temp dir $tmp" +function cleanup() { + echo "Cleaning up" + rm -rf $tmp + echo "Done" +} +trap cleanup INT TERM EXIT +set -e + +unzip -q $src -d $tmp +chmod -R +r $tmp +tar -c -z -f $dest -C $tmp .