FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Package only from root plus powershell by TravisEz13 · Pull Request #4569 · PowerShell/PowerShell · GitHub

Package only from root plus powershell - #4569

Merged
Dongbo Wang (daxian-dbw) merged 9 commits into
PowerShell:masterfrom
TravisEz13:PackageOnlyFromRootPlusPowerShell
Aug 15, 2017
Merged

Package only from root plus powershell#4569
Dongbo Wang (daxian-dbw) merged 9 commits into
PowerShell:masterfrom
TravisEz13:PackageOnlyFromRootPlusPowerShell

Conversation

Copy link
Copy Markdown
Member

fixes #4492

Comment thread tools/packaging/packaging.psm1 Outdated
Write-Warning "Skipping release checks."
}

if(!$Script:Options.RootInfo.IsValid -and -not $SkipReleaseChecks.IsPresent){

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

an elseif is better here.

elseif (!$Script:Options.RootInfo.IsValid) {
    throw $Script:Options.RootInfo.Warning
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Resolved

Comment thread 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

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Don't write the warning in New-PSOptions. We only care about the root path when it comes to a release build.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Resolved

Comment thread 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

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There is an extra space before -SkipReleaseChecks, in both line 182 and 184

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Resolved

Comment thread 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' }

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

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

Labels

WG-Maintainers-Build specific to affecting the build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Official mac build should not contain alias in the path

3 participants


Back | FazBrowse Home | New Git URL