Package only from root plus powershell#4569
Merged
daxian-dbw merged 9 commits intoPowerShell:masterfrom Aug 15, 2017
Merged
Conversation
daxian-dbw
reviewed
Aug 14, 2017
tools/packaging/packaging.psm1
Outdated
| Write-Warning "Skipping release checks." | ||
| } | ||
|
|
||
| if(!$Script:Options.RootInfo.IsValid -and -not $SkipReleaseChecks.IsPresent){ |
Member
There was a problem hiding this comment.
an elseif is better here.
elseif (!$Script:Options.RootInfo.IsValid) {
throw $Script:Options.RootInfo.Warning
}
build.psm1
Outdated
| { | ||
| $RootInfo += @{Warning = "Please ensure you repo is at the root of the file system and named 'PowerShell' (example: '$($RootInfo.ValidPath)'), when building and packaging for release!" } | ||
| $RootInfo += @{IsValid = $false} | ||
| Write-Warning -Message $RootInfo.Warning |
Member
There was a problem hiding this comment.
Don't write the warning in New-PSOptions. We only care about the root path when it comes to a release build.
tools/travis.ps1
Outdated
| $packages += Start-PSPackage @packageParams -Type AppImage | ||
| $packages = @(Start-PSPackage @packageParams -SkipReleaseChecks) | ||
| # Packaging AppImage depends on the deb package | ||
| $packages += Start-PSPackage @packageParams -Type AppImage -SkipReleaseChecks |
Member
There was a problem hiding this comment.
There is an extra space before -SkipReleaseChecks, in both line 182 and 184
daxian-dbw
approved these changes
Aug 14, 2017
daxian-dbw
reviewed
Aug 15, 2017
build.psm1
Outdated
| $RootInfo = @{RepoPath = $PSScriptRoot} | ||
|
|
||
| # the valid root is the root of the filesystem and the folder PowerShell | ||
| $RootInfo += @{ValidPath = Join-Path -Path ([system.io.path]::GetPathRoot($RootInfo.RepoPath)) -ChildPath 'PowerShell' } |
Member
There was a problem hiding this comment.
A minor comment about the way you use Hashtable: in this scenario it's better to write script like
$RootInfo['ValidPath'] = Join-Path -Path ([system.io.path]::GetPathRoot($RootInfo.RepoPath)) -ChildPath 'PowerShell'
$RootInfo['IsValid'] = $true
$RootInfo['Warning'] = "Please ensure you repo is at the root of the file system and named 'PowerShell' (example: '$($RootInfo.ValidPath)'), when building and packaging for release!"
It's much less expensive than adding two hashtables.
daxian-dbw
approved these changes
Aug 15, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #4492