Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding windows server names to the windows packages + Misc formatting fixes#2757

Merged
mirichmo merged 11 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
HemantMahawar:HM-Patch3Copy head branch name to clipboard
Dec 14, 2016
Merged

Adding windows server names to the windows packages + Misc formatting fixes#2757
mirichmo merged 11 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
HemantMahawar:HM-Patch3Copy head branch name to clipboard

Conversation

@HemantMahawar

Copy link
Copy Markdown
Contributor

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

Addresses #2468

Hemant Mahawar added 2 commits November 21, 2016 15:35
… 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
@HemantMahawar

Copy link
Copy Markdown
Contributor Author

@mirichmo and @raghushantha, can you take a look at this PR?

Hemant Mahawar added 3 commits November 21, 2016 16:28
… 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 mirichmo self-assigned this Nov 22, 2016
@mirichmo mirichmo added this to the 6.0.0-alpha.14 milestone Nov 22, 2016
@PowerShellTeam PowerShellTeam added the Review - Needed The PR is being reviewed label Nov 22, 2016
Comment thread build.psm1 Outdated
$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'}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added support for win7-x86 and win7-x64 in alpha.13. Please expand your change to support those runtimes as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

Comment thread build.psm1 Outdated

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 '.'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does $packageVersion come from? Should it be $Version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

Comment thread build.psm1
# We have all the four fields
$packageRevisionTokens = ($packageVersionTokens[3].Split('-'))[0]
$packageSemanticVersion = $packageVersionTokens[0],$packageVersionTokens[1],$packageVersionTokens[2],$packageRevisionTokens -join '.'
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the case where 3 -gt $packageVersionTokens.Count? It should throw since $packageSemanticVersion will not be defined.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added code

Comment thread build.psm1 Outdated

$ProductSemanticVersion = Get-PackageSemanticVersion -Version $PackageVersion

$PackageVersion = Get-PackageVersionAsMajorMinorBuildRevision -Version $PackageVersion

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused except in the Write-Verbose. The actual package name uses $ProductSemanticVesion

@HemantMahawar HemantMahawar Dec 3, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mirichmo Not sure of the ask. Do you want me to remove the variable or call to write-verbose or something else?

@mirichmo mirichmo Dec 3, 2016

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@PowerShellTeam PowerShellTeam added Review - Needed The PR is being reviewed and removed Review - Waiting on Author labels Dec 6, 2016
Comment thread build.psm1
switch ($Runtime) {
'win81-x64' {$NameSuffix = 'win81-win2k12r2-x64'}
'win10-x64' {$NameSuffix = 'win10-win2k16-x64'}
'win7-x64' {$NameSuffix = 'win7-win2k8r2-x64'}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add win7-x86 here too and throughout

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given, there is no x86 version of w2K8r2, win7-x86 case should be covered by the Default {$NameSuffix = $Runtime} below, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh. Good point

Comment thread build.psm1 Outdated
$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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this instead:
"Cannot create Semantic Version from the string $Version containing 4 or more tokens."

@mirichmo mirichmo merged commit e26c2a8 into PowerShell:master Dec 14, 2016
@HemantMahawar HemantMahawar deleted the HM-Patch3 branch January 12, 2017 01:00
@HemantMahawar HemantMahawar removed the Review - Needed The PR is being reviewed label Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.