Package only from root plus powershell - #4569
Merged
Dongbo Wang (daxian-dbw) merged 9 commits intoAug 15, 2017
Merged
Conversation
Travis Plunk (TravisEz13)
requested review from
Aditya Patwardhan (adityapatwardhan) and
sergei (vors)
August 14, 2017 15:46
| Write-Warning "Skipping release checks." | ||
| } | ||
|
|
||
| if(!$Script:Options.RootInfo.IsValid -and -not $SkipReleaseChecks.IsPresent){ |
There was a problem hiding this comment.
an elseif is better here.
elseif (!$Script:Options.RootInfo.IsValid) {
throw $Script:Options.RootInfo.Warning
}
Member
Author
There was a problem hiding this comment.
Resolved
| { | ||
| $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 |
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.
Member
Author
There was a problem hiding this comment.
Resolved
| $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 |
There was a problem hiding this comment.
There is an extra space before -SkipReleaseChecks, in both line 182 and 184
Member
Author
There was a problem hiding this comment.
Resolved
Dongbo Wang (daxian-dbw)
approved these changes
Aug 14, 2017
| $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' } |
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.
Dongbo Wang (daxian-dbw)
approved these changes
Aug 15, 2017
Travis Plunk (TravisEz13)
deleted the
PackageOnlyFromRootPlusPowerShell
branch
August 15, 2017 23:21
Thatgfsj (Thatgfsj)
pushed a commit
to Thatgfsj/PowerShell
that referenced
this pull request
Aug 6, 2026
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