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

Package only from root plus powershell#4569

Merged
daxian-dbw merged 9 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
TravisEz13:PackageOnlyFromRootPlusPowerShellTravisEz13/PowerShell:PackageOnlyFromRootPlusPowerShellCopy head branch name to clipboard
Aug 15, 2017
Merged

Package only from root plus powershell#4569
daxian-dbw merged 9 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
TravisEz13:PackageOnlyFromRootPlusPowerShellTravisEz13/PowerShell:PackageOnlyFromRootPlusPowerShellCopy head branch name to clipboard

Conversation

@TravisEz13
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.

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.

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.

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.

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.

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.

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.

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

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

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