From 4dfd351c8489cd5f5c4d45266c9fbbf6122923fe Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 15 Oct 2018 09:46:20 -0700 Subject: [PATCH 1/7] Remove DataProtection submodule and update path to DP source code to local folder --- .gitmodules | 4 ---- build/RepositoryBuild.targets | 3 +++ build/buildorder.props | 11 ++++++++--- build/submodules.props | 2 +- modules/DataProtection | 1 - src/DataProtection/build/repo.props | 6 ++++++ 6 files changed, 18 insertions(+), 9 deletions(-) delete mode 160000 modules/DataProtection create mode 100644 src/DataProtection/build/repo.props diff --git a/.gitmodules b/.gitmodules index ed8ae26eba..972b9ce3f8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,10 +38,6 @@ path = modules/CORS url = https://github.com/aspnet/CORS.git branch = release/2.1 -[submodule "modules/DataProtection"] - path = modules/DataProtection - url = https://github.com/aspnet/DataProtection.git - branch = release/2.1 [submodule "modules/DependencyInjection"] path = modules/DependencyInjection url = https://github.com/aspnet/DependencyInjection.git diff --git a/build/RepositoryBuild.targets b/build/RepositoryBuild.targets index be43e8dc75..a97112a561 100644 --- a/build/RepositoryBuild.targets +++ b/build/RepositoryBuild.targets @@ -11,6 +11,9 @@ + + $(SubmoduleRoot)%(Identity)\ + %(RepositoryBuildOrder.Order) %(RepositoryBuildOrder.Identity) diff --git a/build/buildorder.props b/build/buildorder.props index 0c20ba10c9..c8b166f55b 100644 --- a/build/buildorder.props +++ b/build/buildorder.props @@ -1,4 +1,11 @@ + + + + + + + @@ -17,7 +24,7 @@ - + @@ -47,7 +54,5 @@ - - diff --git a/build/submodules.props b/build/submodules.props index 2a0bf13984..cc0a5c1603 100644 --- a/build/submodules.props +++ b/build/submodules.props @@ -57,7 +57,7 @@ - + diff --git a/modules/DataProtection b/modules/DataProtection deleted file mode 160000 index b62bb5778b..0000000000 --- a/modules/DataProtection +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b62bb5778be59cbde9b2e6bbdef20f40eef42355 diff --git a/src/DataProtection/build/repo.props b/src/DataProtection/build/repo.props new file mode 100644 index 0000000000..59ae0807d3 --- /dev/null +++ b/src/DataProtection/build/repo.props @@ -0,0 +1,6 @@ + + + + true + + From a673bfd741df5728a5b50eb6b20e6bd70941e6cc Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 15 Oct 2018 10:03:59 -0700 Subject: [PATCH 2/7] Add build script and CI config for the DataProtection folder --- .azure/pipelines/fast-pr-validation.yml | 11 +++++++++++ run.ps1 | 15 +++++++++------ run.sh | 17 ++++++++++++----- src/DataProtection/build.cmd | 3 +++ src/DataProtection/build.sh | 7 +++++++ 5 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 src/DataProtection/build.cmd create mode 100755 src/DataProtection/build.sh diff --git a/.azure/pipelines/fast-pr-validation.yml b/.azure/pipelines/fast-pr-validation.yml index 426b7a79a8..e91c970c6b 100644 --- a/.azure/pipelines/fast-pr-validation.yml +++ b/.azure/pipelines/fast-pr-validation.yml @@ -15,3 +15,14 @@ phases: - template: .vsts-pipelines/templates/project-ci.yml@buildtools parameters: buildArgs: "/t:CheckUniverse" +- phase: DataProtection + queue: Hosted VS2017 + steps: + - script: src/DataProtection/build.cmd -ci + displayName: Run src/DataProtection/build.cmd + - task: PublishTestResults@2 + displayName: Publish test results + condition: always() + inputs: + testRunner: vstest + testResultsFiles: 'src/DataProtection/artifacts/logs/**/*.trx' diff --git a/run.ps1 b/run.ps1 index 60e533097c..6b7e36c6cf 100644 --- a/run.ps1 +++ b/run.ps1 @@ -14,6 +14,9 @@ The KoreBuild command to run. .PARAMETER Path The folder to build. Defaults to the folder containing this script. +.PARAMETER LockFile +The path to the korebuild-lock.txt file. Defaults to $Path/korebuild-lock.txt + .PARAMETER Channel The channel of KoreBuild to download. Overrides the value from the config file. @@ -75,6 +78,7 @@ param( [Parameter(Mandatory=$true, Position = 0)] [string]$Command, [string]$Path = $PSScriptRoot, + [string]$LockFile, [Alias('c')] [string]$Channel, [Alias('d')] @@ -104,15 +108,13 @@ $ErrorActionPreference = 'Stop' function Get-KoreBuild { - $lockFile = Join-Path $Path 'korebuild-lock.txt' - - if (!(Test-Path $lockFile) -or $Update) { - Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile + if (!(Test-Path $LockFile) -or $Update) { + Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $LockFile } - $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 + $version = Get-Content $LockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 if (!$version) { - Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" + Write-Error "Failed to parse version from $LockFile. Expected a line that begins with 'version:'" } $version = $version.TrimStart('version:').Trim() $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) @@ -207,6 +209,7 @@ if (!$DotNetHome) { else { Join-Path $PSScriptRoot '.dotnet'} } +if (!$LockFile) { $LockFile = Join-Path $Path 'korebuild-lock.txt' } if (!$Channel) { $Channel = 'master' } if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } diff --git a/run.sh b/run.sh index beaca3094f..cfc0a36904 100755 --- a/run.sh +++ b/run.sh @@ -15,6 +15,7 @@ verbose=false update=false reinstall=false repo_path="$DIR" +lockfile_path='' channel='' tools_source='' ci=false @@ -41,6 +42,7 @@ __usage() { echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." echo " --path The directory to build. Defaults to the directory containing the script." + echo " --lockfile The path to the korebuild-lock.txt file. Defaults to \$repo_path/korebuild-lock.txt" echo " -s|--tools-source|-ToolsSource The base url where build tools can be downloaded. Overrides the value from the config file." echo " --package-version-props-url The url of the package versions props path containing dependency versions." echo " --access-token The query string to append to any blob store access for PackageVersionPropsUrl, if any." @@ -61,13 +63,12 @@ __usage() { get_korebuild() { local version - local lock_file="$repo_path/korebuild-lock.txt" - if [ ! -f "$lock_file" ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" + if [ ! -f "$lockfile_path" ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lockfile_path" fi - version="$(grep 'version:*' -m 1 "$lock_file")" + version="$(grep 'version:*' -m 1 "$lockfile_path")" if [[ "$version" == '' ]]; then - __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" + __error "Failed to parse version from $lockfile_path. Expected a line that begins with 'version:'" return 1 fi version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" @@ -176,6 +177,11 @@ while [[ $# -gt 0 ]]; do repo_path="${1:-}" [ -z "$repo_path" ] && __error "Missing value for parameter --path" && __usage ;; + --[Ll]ock[Ff]ile) + shift + lockfile_path="${1:-}" + [ -z "$lockfile_path" ] && __error "Missing value for parameter --lockfile" && __usage + ;; -s|--tools-source|-ToolsSource) shift tools_source="${1:-}" @@ -296,6 +302,7 @@ if [ ! -z "$product_build_id" ]; then msbuild_args[${#msbuild_args[*]}]="-p:DotNetProductBuildId=$product_build_id" fi +[ -z "$lockfile_path" ] && lockfile_path="$repo_path/korebuild-lock.txt" [ -z "$channel" ] && channel='master' [ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' diff --git a/src/DataProtection/build.cmd b/src/DataProtection/build.cmd new file mode 100644 index 0000000000..f4169ea5e4 --- /dev/null +++ b/src/DataProtection/build.cmd @@ -0,0 +1,3 @@ +@ECHO OFF +SET RepoRoot="%~dp0..\.." +%RepoRoot%\build.cmd -LockFile %RepoRoot%\korebuild-lock.txt -Path %~dp0 %* diff --git a/src/DataProtection/build.sh b/src/DataProtection/build.sh new file mode 100755 index 0000000000..d5bb0cf631 --- /dev/null +++ b/src/DataProtection/build.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +repo_root="$DIR/../.." +"$repo_root/build.sh" --path "$DIR" --lockfile "$repo_root/korebuild-lock.txt" "$@" From 6a14b47ccdaa111e959dcffba4a53727a99b53bf Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 15 Oct 2018 10:56:55 -0700 Subject: [PATCH 3/7] Add infrastructure changes to src/DataProtection can build on its own --- src/DataProtection/NuGetPackageVerifier.json | 7 +++++++ src/DataProtection/build/repo.props | 4 ++++ src/DataProtection/dependencies.props | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/DataProtection/NuGetPackageVerifier.json diff --git a/src/DataProtection/NuGetPackageVerifier.json b/src/DataProtection/NuGetPackageVerifier.json new file mode 100644 index 0000000000..22ef3c09c0 --- /dev/null +++ b/src/DataProtection/NuGetPackageVerifier.json @@ -0,0 +1,7 @@ +{ + "Default": { + "rules": [ + "DefaultCompositeRule" + ] + } +} diff --git a/src/DataProtection/build/repo.props b/src/DataProtection/build/repo.props index 59ae0807d3..3fa98a9b36 100644 --- a/src/DataProtection/build/repo.props +++ b/src/DataProtection/build/repo.props @@ -1,6 +1,10 @@ + true + + + diff --git a/src/DataProtection/dependencies.props b/src/DataProtection/dependencies.props index 02e944fdb3..687186b112 100644 --- a/src/DataProtection/dependencies.props +++ b/src/DataProtection/dependencies.props @@ -6,6 +6,22 @@ 2.2.0-preview2-20181004.6 + 2.2.0-preview3-35497 + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) + $(LastGoodAspBuildVersion) - 2.2.0-preview3-27008-03 - 2.2.0-preview3-27008-03 - 4.6.0-preview3-27008-03 + 2.2.0-preview3-27014-02 + 2.2.0-preview3-27014-02 + 4.6.0-preview3-27014-02 From c6ed32fee8d16b1d3d8e4a475fecffb914e28aba Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 16 Oct 2018 10:27:32 -0700 Subject: [PATCH 5/7] Remove deleted files from baselines --- .../Templates/RazorBootstrapJQueryTemplate.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/Cli.FunctionalTests/Templates/RazorBootstrapJQueryTemplate.cs b/test/Cli.FunctionalTests/Templates/RazorBootstrapJQueryTemplate.cs index 0ddc5a4539..b4752c4e26 100644 --- a/test/Cli.FunctionalTests/Templates/RazorBootstrapJQueryTemplate.cs +++ b/test/Cli.FunctionalTests/Templates/RazorBootstrapJQueryTemplate.cs @@ -22,12 +22,10 @@ namespace Cli.FunctionalTests.Templates Path.Combine("wwwroot", "lib", "bootstrap", "dist", "css", "bootstrap.min.css.map"), Path.Combine("wwwroot", "lib", "bootstrap", "dist", "js", "bootstrap.js"), Path.Combine("wwwroot", "lib", "bootstrap", "dist", "js", "bootstrap.min.js"), - Path.Combine("wwwroot", "lib", "jquery", ".bower.json"), Path.Combine("wwwroot", "lib", "jquery", "LICENSE.txt"), Path.Combine("wwwroot", "lib", "jquery", "dist", "jquery.js"), Path.Combine("wwwroot", "lib", "jquery", "dist", "jquery.min.js"), Path.Combine("wwwroot", "lib", "jquery", "dist", "jquery.min.map"), - Path.Combine("wwwroot", "lib", "jquery-validation", ".bower.json"), Path.Combine("wwwroot", "lib", "jquery-validation", "LICENSE.md"), Path.Combine("wwwroot", "lib", "jquery-validation", "dist", "additional-methods.js"), Path.Combine("wwwroot", "lib", "jquery-validation", "dist", "additional-methods.min.js"), From e3c0e867e1bec5cc91b00337fc6c27e996e74710 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 16 Oct 2018 11:30:52 -0700 Subject: [PATCH 6/7] Update branding to 2.2.0-rtm --- version.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/version.props b/version.props index 9c536350be..b43ef1365b 100644 --- a/version.props +++ b/version.props @@ -3,8 +3,8 @@ 2 2 0 - preview3 - Preview 3 + rtm + t000 $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion) 0.2.$(AspNetCorePatchVersion) @@ -18,7 +18,7 @@ $(VersionPrefix) - $(PackageBrandingVersion) $(BrandingVersionSuffix) + $(PackageBrandingVersion) $(BrandingVersionSuffix.Trim()) $(VersionPrefix) From 6366deb19362c37b964de3daa723f50cdcb4a325 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 16 Oct 2018 11:33:17 -0700 Subject: [PATCH 7/7] Update dataprotection to 2.2.0-rtm --- src/DataProtection/version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataProtection/version.props b/src/DataProtection/version.props index 704cac087b..4889a26987 100644 --- a/src/DataProtection/version.props +++ b/src/DataProtection/version.props @@ -1,7 +1,7 @@ 2.2.0 - preview3 + rtm $(VersionPrefix) $(VersionPrefix)-$(VersionSuffix)-final t000