Skip to content

Commit 3d335ab

Browse files
Bump minor version S.SM.P plus many other build updates.
* Bump minor version of System.ServiceModel.Primitives * Update to latest build tools. * Update with many changes to shared build files from CoreFx.
2 parents 4ba5c25 + 9ecf934 commit 3d335ab

File tree

131 files changed

+348
-586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+348
-586
lines changed

BuildToolsVersion.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.26-prerelease-00809-01
1+
1.0.26-prerelease-00912-02

Packaging.props

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<PreReleaseLabel>beta</PreReleaseLabel>
44
<PackageDescriptionFile>$(ProjectDir)pkg/descriptions.json</PackageDescriptionFile>
@@ -25,7 +25,7 @@
2525
<SkipValidatePackageTargetFramework>true</SkipValidatePackageTargetFramework>
2626
</PropertyGroup>
2727

28-
<Import Condition="Exists('pkg/baseline/baseline.props')" Project="pkg/baseline/baseline.props" />
28+
<Import Condition="Exists('pkg/baseline/baseline.props') AND '$(MSBuildProjectExtension)' == '.pkgproj'" Project="pkg/baseline/baseline.props" />
2929

3030
<PropertyGroup Condition="'$(OsEnvironment)'=='Unix'">
3131
<!--
@@ -36,8 +36,8 @@
3636
<SkipBuildPackages>true</SkipBuildPackages>
3737
</PropertyGroup>
3838

39-
<!-- Add required legal files to packages -->
4039
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
40+
<!-- Add required legal files to packages -->
4141
<File Condition="Exists('$(PackageLicenseFile)')"
4242
Include="$(PackageLicenseFile)" >
4343
<SkipPackageFileCheck>true</SkipPackageFileCheck>
@@ -46,5 +46,11 @@
4646
Include="$(PackageThirdPartyNoticesFile)" >
4747
<SkipPackageFileCheck>true</SkipPackageFileCheck>
4848
</File>
49+
50+
<!-- Add version file to packages -->
51+
<File Condition="Exists('$(SyncInfoFile)')"
52+
Include="$(SyncInfoFile)" >
53+
<SkipPackageFileCheck>true</SkipPackageFileCheck>
54+
</File>
4955
</ItemGroup>
5056
</Project>

UpdatePublishedVersions.ps1

Lines changed: 10 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -14,130 +14,13 @@ param(
1414
[Parameter(Mandatory=$true)][string]$versionsRepo,
1515
[Parameter(Mandatory=$true)][string]$versionsRepoPath,
1616
# A pattern matching all packages in the set that the versions repository should be set to.
17-
[Parameter(Mandatory=$true)][string]$nupkgPath,
18-
# Print out the new file contents, but don't change the versions repository.
19-
[switch]$dryRun)
20-
21-
function ConvertPathTo-Package([string]$path)
22-
{
23-
# Find the package ID and version using a regex. This matches the semantic version
24-
# and assumes everything to the left is the id or a path to the package directory.
25-
$matched = $path -match '^(.*\\)?(.*?)\.(([0-9]+\.)?[0-9]+\.[0-9]+(-([A-z0-9-]+))?)\.(symbols\.)?nupkg$'
26-
if ($matched)
27-
{
28-
$packageInfo = @{
29-
Path = $path
30-
Name = $matches[2]
31-
Version = $matches[3]
32-
Prerelease = $matches[6]
33-
}
34-
$packageInfo.NameVersion = "$($packageInfo.Name) $($packageInfo.Version)"
35-
return $packageInfo
36-
}
37-
else
38-
{
39-
throw "Couldn't find name and version from path $path."
40-
}
41-
}
42-
43-
# Updates a GitHub file with the specified file contents
44-
function Update-GitHub-File(
45-
[string]$user = $gitHubUser,
46-
[string]$email = $gitHubEmail,
47-
[string]$authToken = $gitHubAuthToken,
48-
[string]$owner = $versionsRepoOwner,
49-
[string]$repo = $versionsRepo,
50-
[string]$path,
51-
[string]$newFileContent,
52-
[string]$commitMessage)
53-
{
54-
function message([string]$message)
55-
{
56-
Write-Host -ForegroundColor Green "*** $message ***"
57-
}
58-
59-
$headers = @{
60-
'Accept' = 'application/vnd.github.v3+json'
61-
'Authorization' = "token $authToken"
62-
}
63-
64-
$fileUrl = "https://api.github.com/repos/$owner/$repo/contents/$path"
65-
66-
message "Getting the `"sha`" of the current contents of file '$owner/$repo/$path'"
67-
68-
$currentFile = Invoke-WebRequest $fileUrl -UseBasicParsing -Headers $headers
69-
$currentSha = (ConvertFrom-Json $currentFile.Content).sha
70-
71-
message "Got `"sha`" value of '$currentSha'"
72-
73-
message "Request to update file '$owner/$repo/$path' contents to:"
74-
Write-Host $newFileContent
75-
76-
if ($dryRun)
77-
{
78-
message 'Not sending request: dry run.'
79-
return
80-
}
81-
82-
# Base64 encode the string
83-
function ToBase64([string]$value)
84-
{
85-
return [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($value))
86-
}
87-
88-
$updateFileBody =
89-
@"
90-
{
91-
"message": "$commitMessage",
92-
"committer": {
93-
"name": "$user",
94-
"email": "$email"
95-
},
96-
"content": "$(ToBase64 $newFileContent)",
97-
"sha": "$currentSha"
98-
}
99-
"@
100-
101-
message 'Sending request...'
102-
$putResponse = Invoke-WebRequest $fileUrl -UseBasicParsing -Method PUT -Body $updateFileBody -Headers $headers
103-
104-
if ($putResponse.StatusCode -ge 200 -and $putResponse.StatusCode -lt 300)
105-
{
106-
message 'Successfully updated the file'
107-
}
108-
}
109-
110-
# Store result of Get-ChildItem before piping to ConvertPathTo-Package. When directly piping, exceptions are ignored.
111-
$packagePaths = Get-ChildItem $nupkgPath
112-
$packages = $packagePaths | %{ ConvertPathTo-Package $_ }
113-
114-
$prereleaseVersion = ''
115-
foreach ($package in $packages)
116-
{
117-
if ($package.Prerelease)
118-
{
119-
$prereleaseVersion = $package.Prerelease
120-
break
121-
}
122-
}
123-
124-
if (!$prereleaseVersion)
125-
{
126-
throw "Could not find a Prerelease version in '$newPackages'"
127-
}
128-
129-
$versionFilePath = "$versionsRepoPath/Latest.txt"
130-
$versionFileContent = "$prereleaseVersion`n"
131-
132-
Update-GitHub-File `
133-
-path $versionFilePath `
134-
-newFileContent $versionFileContent `
135-
-commitMessage "Update '$versionFilePath' with $prereleaseVersion"
136-
137-
$packageInfoFilePath = "$versionsRepoPath/Latest_Packages.txt"
138-
$packageInfoFileContent = ($packages | %{ $_.NameVersion } | Sort-Object) -join "`r`n"
139-
140-
Update-GitHub-File `
141-
-path $packageInfoFilePath `
142-
-newFileContent $packageInfoFileContent `
143-
-commitMessage "Adding package info to '$packageInfoFilePath' for $prereleaseVersion"
17+
[Parameter(Mandatory=$true)][string]$nupkgPath)
18+
19+
. "$PSScriptRoot\build-managed.cmd" -- /t:UpdatePublishedVersions `
20+
/p:GitHubUser="$gitHubUser" `
21+
/p:GitHubEmail="$gitHubEmail" `
22+
/p:GitHubAuthToken="$gitHubAuthToken" `
23+
/p:VersionsRepoOwner="$versionsRepoOwner" `
24+
/p:VersionsRepo="$versionsRepo" `
25+
/p:VersionsRepoPath="$versionsRepoPath" `
26+
/p:ShippedNuGetPackageGlobPath="$nupkgPath"

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@if "%_echo%" neq "on" echo off
1+
@if not defined _echo @echo off
22
setlocal
33

44
if /I [%1] == [-?] goto Usage

build.proj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<!-- Capture OSGroup passed to command line for setting default FilterToOSGroup value below -->
55
<_OriginalOSGroup>$(OSGroup)</_OriginalOSGroup>
@@ -75,6 +75,13 @@
7575

7676
<UsingTask TaskName="GatherDirectoriesToRestore" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
7777

78+
<!-- Create a collection of all project.json files for dependency updates. -->
79+
<ItemGroup>
80+
<ProjectJsonFiles Include="$(SourceDir)**/project.json" />
81+
<ProjectJsonFiles Include="$(MSBuildThisFileDirectory)pkg/**/project.json" />
82+
<ProjectJsonFiles Condition="'$(BuildTestsAgainstPackages)' == 'true'" Include="$(GeneratedProjectJsonDir)/**/project.json" />
83+
</ItemGroup>
84+
7885
<Target Name="BatchRestorePackages" DependsOnTargets="VerifyDependencies">
7986
<MakeDir Directories="$(PackagesDir)" Condition="!Exists('$(PackagesDir)')" />
8087

clean.cmd

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@if "%_echo%" neq "on" echo off
1+
@if not defined _echo @echo off
22
setlocal EnableDelayedExpansion
33

44
echo Stop VBCSCompiler.exe execution.
@@ -8,12 +8,17 @@ echo Cleanup StopWcfSelfHostedSvc.cmd
88
call src\System.Private.ServiceModel\tools\scripts\StopWcfSelfHostedSvc.cmd
99
type SelfHostedWcfServiceCleanup.log
1010

11-
if [%1] == [-all] (
11+
:: Strip all dashes off the argument and use invariant
12+
:: compare to match as many versions of "all" that we can
13+
:: All other argument validation happens inside Run.exe
14+
set NO_DASHES_ARG=%1
15+
if not defined NO_DASHES_ARG goto no_args
16+
if /I [%NO_DASHES_ARG:-=%] == [all] (
1217
echo Cleaning entire working directory ...
1318
call git clean -xdf
1419
exit /b !ERRORLEVEL!
1520
)
16-
21+
:no_args
1722
if [%1]==[] set __args=-b
1823
call %~dp0run.cmd clean %__args% %*
1924
exit /b %ERRORLEVEL%

config.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"description": "MsBuild logging options.",
143143
"valueType": "passThrough",
144144
"values": [],
145-
"defaultValue": "/flp:v=normal"
145+
"defaultValue": "/flp:v=diag"
146146
},
147147
"MsBuildWarning": {
148148
"description": "MsBuild warning logging.",
@@ -180,12 +180,6 @@
180180
"values": [],
181181
"defaultValue": ""
182182
},
183-
"ExtraParameters": {
184-
"description": "Extra parameters will be passed to the selected command.",
185-
"valueType": "passThrough",
186-
"values": [],
187-
"defaultValue": ""
188-
},
189183
"BatchGenerateTestProjectJsons": {
190184
"description": "MsBuild target that generates the project.json files to build tests against packages.",
191185
"valueType": "target",
@@ -249,8 +243,9 @@
249243
}
250244
},
251245
"tests": {
252-
"description": "Builds the tests that are in the repository.",
246+
"description": "Builds the tests that are in the repository, doesn't restore packages.",
253247
"settings": {
248+
"RestoreDuringBuild": "false",
254249
"Project": "src/tests.builds",
255250
"MsBuildLogging":"/flp:v=normal;LogFile=build-tests.log"
256251
}
@@ -458,6 +453,7 @@
458453
}
459454
},
460455
"defaultValues": {
456+
"defaultAlias": "p",
461457
"toolName": "msbuild",
462458
"settings": {
463459
"MsBuildLogging":"/flp:v=normal;LogFile=sync.log"

dependencies.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. -->
33
<PropertyGroup>
44
<CoreFxCurrentRef>0e5b63ea85c76e944b925a6d3802c84d7e46a9df</CoreFxCurrentRef>
@@ -52,11 +52,11 @@
5252
</StaticDependency>
5353

5454
<StaticDependency Include="Microsoft.xunit.netcore.extensions;Microsoft.DotNet.BuildTools.TestSuite">
55-
<Version>1.0.0-prerelease-00807-03</Version>
55+
<Version>1.0.0-prerelease-00830-02</Version>
5656
</StaticDependency>
5757

5858
<StaticDependency Include="Microsoft.TargetingPack.Private.NETNative">
59-
<Version>1.1.0-beta-24509-00</Version>
59+
<Version>1.1.0-beta-24607-01</Version>
6060
</StaticDependency>
6161

6262
<DependencyBuildInfo Include="@(StaticDependency)">

0 commit comments

Comments
 (0)