★ wanayoo — archive 1999 https://github.com/PowerShell/PowerShell/pull/7841Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Start-PSPackage give better message about how to fix files.wxs #7841

Merged
merged 3 commits into from Sep 25, 2018

Conversation

Projects
None yet
4 participants
@daxian-dbw
Copy link
Member

commented Sep 22, 2018 •

PR Summary

Make Start-PSPackage give a better message about how to fix files.wxs
Some minor changes:

  1. Avoid relative paths as much as possible.
  2. Add a message about how to fix files.wxs when current files don't match the existing files.wxs.
  3. Fix a few script analyzer warnings since I'm on it.

The messages before this PR: (relative paths)

PS:137> Start-PSPackage -Type msi
Packaging RID: 'win7-x64'; Packaging Configuration: 'Release'
Packaging Source: 'E:\PowerShell\src\powershell-win-core\bin\Release\netcoreapp2.1\win7-x64\publish'
Packaging Type: msi
verifying no new files have been added or removed...
WARNING: {$(env.ProductSourcePath)\sos_amd64_amd64_4.6.26814.04.dll} is no longer in product and should be removed from {E:\PowerShell\tools\packaging\..\..\assets\Files.wxs}
WARNING: new file in {$(env.ProductSourcePath)} with name {sos_amd64_amd64_4.6.26814.03.dll} in a {DirectoryRef} need to be added to {E:\PowerShell\tools\packaging\..\..\assets\Files.wxs}
Update xml saved to C:\Users\dongbow\AppData\Local\Temp\chov3oyp.3oi.xml
Current files to not match  {E:\PowerShell\tools\packaging\..\..\assets\Files.wxs}
At E:\PowerShell\tools\packaging\packaging.psm1:2721 char:9
+         throw "Current files to not match  {$FilesWxsPath}"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OperationStopped: (Current files t...sets\Files.wxs}:String) [], RuntimeException
+ FullyQualifiedErrorId : Current files to not match  {E:\PowerShell\tools\packaging\..\..\assets\Files.wxs}

The message with this PR: (resolved paths)

PS:139> Start-PSPackage -Type msi
Packaging RID: 'win7-x64'; Packaging Configuration: 'Release'
Packaging Source: 'E:\PowerShell\src\powershell-win-core\bin\Release\netcoreapp2.1\win7-x64\publish'
Packaging Type: msi
verifying no new files have been added or removed...
WARNING: {$(env.ProductSourcePath)\sos_amd64_amd64_4.6.26814.04.dll} is no longer in product and should be removed from {E:\PowerShell\assets\Files.wxs}
WARNING: new file in {$(env.ProductSourcePath)} with name {sos_amd64_amd64_4.6.26814.03.dll} in a {DirectoryRef} need to be added to {E:\PowerShell\assets\Files.wxs}
Updated xml saved to C:\Users\dongbow\AppData\Local\Temp\prumscbt.xax.wxs.
If component files were intentionally changed, such as due to moving to a newer .NET Core runtime, update 'E:\PowerShell\assets\Files.wxs' with the content from 'C:\Users\dongbow\AppData\Local\Temp\prumscbt.xax.wxs'.
Current files to not match  {E:\PowerShell\assets\Files.wxs}
At E:\PowerShell\tools\packaging\packaging.psm1:2724 char:9
+         throw "Current files to not match  {$FilesWxsPath}"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OperationStopped: (Current files t...sets\Files.wxs}:String) [], RuntimeException
+ FullyQualifiedErrorId : Current files to not match  {E:\PowerShell\assets\Files.wxs}

PR Checklist

@@ -1743,7 +1745,7 @@ function New-NuSpec {
$nuspecTemplate = $packagingStrings.NuspecTemplate -f $PackageId,$PackageVersion
$nuspecObj = [xml] $nuspecTemplate

if ( ($Dependency -ne $null) -and $Dependency.Count -gt 0 ) {
if ( ($null -ne $Dependency) -and $Dependency.Count -gt 0 ) {

This comment has been minimized.

Copy link
@iSazonov

iSazonov Sep 24, 2018

Collaborator

I wonder that we change this.

This comment has been minimized.

Copy link
@daxian-dbw

daxian-dbw Sep 25, 2018

Author Member

Do you mean "why we change this"? It's reported as a warning from Script Analyzer.

@TravisEz13
Copy link
Member

left a comment

Nothing blocking

@@ -1519,7 +1521,7 @@ function New-UnifiedNugetPackage
{

$refBinPath = New-TempFolder
$SnkFilePath = Join-Path $PSScriptRoot -ChildPath '../../src/signing/visualstudiopublic.snk' -Resolve
$SnkFilePath = (Resolve-Path "$RepoRoot/src/signing/visualstudiopublic.snk").Path

This comment has been minimized.

Copy link
@TravisEz13

TravisEz13 Sep 24, 2018

Member

NIT: Does this really need to be resolved? $RepoRoot was already resolved.

This comment has been minimized.

Copy link
@daxian-dbw

daxian-dbw Sep 25, 2018

Author Member

I was trying to be safe just in case that it expects the path separator to be platform specific.
Will look into how this path is used and see if it really needs to be resolved.

This comment has been minimized.

Copy link
@daxian-dbw

daxian-dbw Sep 25, 2018

Author Member

The path is only used in New-ReferenceAssembly, which only runs on windows platform. So I can change it to use \ directory separator.

@daxian-dbw daxian-dbw merged commit 4926e15 into PowerShell:master Sep 25, 2018

8 checks passed

CodeFactor No issues found.
Details
PowerShell-CI-linux #PR-7841-20180925.01 succeeded
Details
PowerShell-CI-macos #PR-7841-20180925.01 succeeded
Details
PowerShell-CI-spelling #PR-7841-20180925.01 succeeded
Details
PowerShell-CI-windows #PR-7841-20180925.01 succeeded
Details
WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details

@daxian-dbw daxian-dbw deleted the daxian-dbw:minor branch Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.