Adding windows server names to the windows packages + Misc formatting fixes#2757
Adding windows server names to the windows packages + Misc formatting fixes#2757mirichmo merged 11 commits intoPowerShell:masterPowerShell/PowerShell:masterfrom HemantMahawar:HM-Patch3Copy head branch name to clipboard
Conversation
… fix Misc fixes are: - Added Get-PackageSemanticVersion function - Added New-ZipPackage function to separate the Zip packaging code - Removed ending ';' in hashtable syntax since entries are on new lines - Standardized the variable name from $Source to $PackageSourcePath for various packaging functions - Removed 'return' in the function end to output the variable value - Added -verbose to Write-Verbose to show the paths of various packages
|
@mirichmo and @raghushantha, can you take a look at this PR? |
… fix Misc fixes are: - Added Get-PackageSemanticVersion function - Added New-ZipPackage function to separate the Zip packaging code - Removed ending ';' in hashtable syntax since entries are on new lines - Standardized the variable name from $Source to $PackageSourcePath for various packaging functions - Removed 'return' in the function end to output the variable value - Added -verbose to Write-Verbose to show the paths of various packages
| $NameSuffix = $VersionTokens[1], $Runtime -join "-" | ||
| # Add the server name to the $RunTime. $runtime produced by dotnet is same for client or server | ||
| switch ($Runtime) { | ||
| 'win81-x64' {$NameSuffix = 'win81-w2k12r2-x64'} |
There was a problem hiding this comment.
I added support for win7-x86 and win7-x64 in alpha.13. Please expand your change to support those runtimes as well
|
|
||
| if (3 -eq $packageVersionTokens.Count) { | ||
| # In case the input is of the form a.b.c, add a '0' at the end for revision field | ||
| $packageSemanticVersion = $packageVersion,'0' -join '.' |
There was a problem hiding this comment.
Where does $packageVersion come from? Should it be $Version?
| # We have all the four fields | ||
| $packageRevisionTokens = ($packageVersionTokens[3].Split('-'))[0] | ||
| $packageSemanticVersion = $packageVersionTokens[0],$packageVersionTokens[1],$packageVersionTokens[2],$packageRevisionTokens -join '.' | ||
| } |
There was a problem hiding this comment.
What about the case where 3 -gt $packageVersionTokens.Count? It should throw since $packageSemanticVersion will not be defined.
|
|
||
| $ProductSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion | ||
|
|
||
| $PackageVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $PackageVersion |
There was a problem hiding this comment.
This is unused except in the Write-Verbose. The actual package name uses $ProductSemanticVesion
There was a problem hiding this comment.
@mirichmo Not sure of the ask. Do you want me to remove the variable or call to write-verbose or something else?
There was a problem hiding this comment.
I'm not sure of the coding intent here. Why doesn't the Write-Verbose use $ProductSemanticVersion? $PackageVersion is not used anywhere except for the Write-Verbose, so that makes me think it was an oversight when refactoring. Is it intentional?
| switch ($Runtime) { | ||
| 'win81-x64' {$NameSuffix = 'win81-win2k12r2-x64'} | ||
| 'win10-x64' {$NameSuffix = 'win10-win2k16-x64'} | ||
| 'win7-x64' {$NameSuffix = 'win7-win2k8r2-x64'} |
There was a problem hiding this comment.
Please add win7-x86 here too and throughout
There was a problem hiding this comment.
Given, there is no x86 version of w2K8r2, win7-x86 case should be covered by the Default {$NameSuffix = $Runtime} below, right?
| $packageRevisionTokens = ($packageVersionTokens[3].Split('-'))[0] | ||
| $packageSemanticVersion = $packageVersionTokens[0],$packageVersionTokens[1],$packageVersionTokens[2],$packageRevisionTokens -join '.' | ||
| } else { | ||
| throw "Cannot create semantic version from a string $Version containing more than 4 tokens" |
There was a problem hiding this comment.
How about this instead:
"Cannot create Semantic Version from the string $Version containing 4 or more tokens."
Misc fixes are:
Addresses #2468