8000 Package only from root plus powershell by TravisEz13 · Pull Request #4569 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Package only from root plus powershell #4569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

TravisEz13
Copy link
Member

fixes #4492

Write-Warning "Skipping release checks."
}

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

Choose a reason for hiding this comment

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

an elseif is better here.

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Resolved

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
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Resolved

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
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Resolved

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
Member

Choose a reason for hiding this comment

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

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 daxian-dbw merged commit 0ca44f1 into PowerShell:master Aug 15, 2017
@TravisEz13 TravisEz13 deleted the PackageOnlyFromRootPlusPowerShell branch August 15, 2017 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-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
0