diff --git a/build/Publish.targets b/build/Publish.targets index 8493ed3e27..d1926ee9b4 100644 --- a/build/Publish.targets +++ b/build/Publish.targets @@ -77,7 +77,7 @@ - + $(BlobBasePath)$(SiteExtensionArchiveFileName) ShipInstaller=dotnetcli diff --git a/build/RepositoryBuild.targets b/build/RepositoryBuild.targets index f4ac942283..4a42a91fff 100644 --- a/build/RepositoryBuild.targets +++ b/build/RepositoryBuild.targets @@ -22,7 +22,7 @@ - + - + + + + + + $(AspNetCoreMajorVersion) + $(AspNetCoreMinorVersion) + $(AspNetCorePatchVersion) + $(PrereleaseVersionLabel) + $(BuildNumber) + $(PackageBrandingVersion) + + +]]> + + + + + + + + Properties="version=$(PackageVersion);dependenciesPropsFile=$(GeneratedPackageVersionPropsPath);brandingPropsFile=$(GeneratedBrandingPropsPath)"> @@ -169,7 +193,7 @@ Solutions="@(Solution)" Artifacts="@(ArtifactInfo);@(ShippedArtifactInfo)" Repositories="@(Repository);@(ShippedRepository)" - Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath)" /> + Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath)" /> f.Dependencies.Keys).Any(d => d.Equals("Microsoft.NET.Test.Sdk", StringComparison.OrdinalIgnoreCase)); + } + var packageId = instance.GetPropertyValue("PackageId"); var packageVersion = instance.GetPropertyValue("PackageVersion"); @@ -86,6 +93,7 @@ namespace RepoTasks.ProjectModel var globalProps = new Dictionary() { ["DesignTimeBuild"] = "true", + // Isolate the project from post-restore side effects ["ExcludeRestorePackageImports"] = "true", }; diff --git a/build/tools/packaging/store_debian_config.json b/build/tools/packaging/store_debian_config.json deleted file mode 100644 index 70dffe42a9..0000000000 --- a/build/tools/packaging/store_debian_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "maintainer_name": "Microsoft", - "maintainer_email": "nugetaspnet@microsoft.com", - - "package_name": "aspnetcore-store", - "install_root": "/usr/share/dotnet", - - "short_description": "Microsoft ASP.NET Core DEB_VERSION Runtime Package Store", - "long_description": "Runtime package store for Microsoft ASP.NET Core. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/aspnet/home). We happily accept issues and PRs.", - "homepage": "https://www.asp.net/", - - "release":{ - "package_version":"0.0.0.0", - "package_revision":"1", - "urgency" : "low", - "changelog_message" : "" - }, - - "control": { - "priority":"standard", - "section":"devel", - "architecture":"any" - }, - - "copyright": "Microsoft", - "license": { - "type": "Apache-2.0", - "full_text": "Copyright (c) .NET Foundation. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthese files except in compliance with the License. You may obtain a copy of the\nLicense at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed\nunder the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\nCONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License." - }, - - "debian_dependencies": { - "aspnetcore-store-2.0.0": {} - } -} \ No newline at end of file diff --git a/build/tools/templates/Archive/Archive.csproj b/build/tools/templates/Archive/Archive.csproj index 20310b15dd..c07f9386f2 100644 --- a/build/tools/templates/Archive/Archive.csproj +++ b/build/tools/templates/Archive/Archive.csproj @@ -10,6 +10,11 @@ 99.9 + true + + + + diff --git a/scripts/ListRepoVersions.ps1 b/scripts/ListRepoVersions.ps1 new file mode 100644 index 0000000000..06ba399166 --- /dev/null +++ b/scripts/ListRepoVersions.ps1 @@ -0,0 +1,23 @@ +#!/usr/bin/env pwsh + +<# +.SYNOPSIS + Lists the version of all submodules and this repo +.PARAMETER Shipping + Only list repos that are shipping +#> +[cmdletbinding(SupportsShouldProcess = $true)] +param( + [switch]$Shipping = $false +) + +Set-StrictMode -Version 2 +$ErrorActionPreference = 'Stop' + +Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1" + +Assert-Git + +$RepoRoot = Resolve-Path "$PSScriptRoot/../" + +Get-Submodules $RepoRoot -Shipping:$Shipping | Format-Table -Property 'module','versionPrefix' diff --git a/scripts/TagRepos.ps1 b/scripts/TagRepos.ps1 new file mode 100644 index 0000000000..2bb595027c --- /dev/null +++ b/scripts/TagRepos.ps1 @@ -0,0 +1,66 @@ +#!/usr/bin/env pwsh + +<# +.SYNOPSIS + Tags each repo according to VersionPrefix in version.props of that repo +.PARAMETER Push + Push all updated tags +.PARAMETER ForceUpdateTag + This will call git tag --force +#> +[cmdletbinding(SupportsShouldProcess = $true)] +param( + [switch]$Push = $false, + [switch]$ForceUpdateTag = $false +) + +Set-StrictMode -Version 2 +$ErrorActionPreference = 'Stop' + +Import-Module -Scope Local -Force "$PSScriptRoot/common.psm1" + +Assert-Git + +$RepoRoot = Resolve-Path "$PSScriptRoot/../" + +Get-Submodules $RepoRoot -Shipping | % { + Push-Location $_.path | Out-Null + try { + + if (-not $_.versionPrefix) { + Write-Warning "Could not determine tag version for $(_.path)" + } + else { + $tag = $_.versionPrefix + Write-Host "$($_.module) => $tag" + + $gitTagArgs = @() + if ($ForceUpdateTag) { + $gitTagArgs += '--force' + } + + Invoke-Block { & git tag @gitTagArgs $tag } + + if ($Push) { + $gitPushArgs = @() + if ($WhatIfPreference) { + $gitPushArgs += '--dry-run' + } + Invoke-Block { & git push @gitPushArgs origin "refs/tags/${tag}" } + } + + if ($WhatIfPreference) { + Invoke-Block { & git tag -d $tag } | Out-Null + } + } + } + catch { + Write-Host -ForegroundColor Red "Could not update $_" + throw + } + finally { + Pop-Location + } +} + + diff --git a/version.props b/version.props index 564474e129..cbecec9741 100644 --- a/version.props +++ b/version.props @@ -6,6 +6,9 @@ $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion) preview1 + + $(VersionPrefix) Preview 1 + 0.2.0 alpha1