Merge the v6.1.0-preview.3 release branch to master (#7060)
This commit is contained in:
commit
9804ae5f97
11
.spelling
11
.spelling
|
@ -426,6 +426,17 @@ Dockerfile
|
|||
VisualStudio
|
||||
readonly
|
||||
PowerShell.6
|
||||
preview.3
|
||||
Auth
|
||||
mcbobke
|
||||
wesholton84
|
||||
Patochun
|
||||
Jumplist
|
||||
bjh7242
|
||||
beta2
|
||||
PSGallery
|
||||
adelton
|
||||
qmfrederik
|
||||
#endregion
|
||||
|
||||
#region CODE_OF_CONDUCT.md Overrides
|
||||
|
|
93
CHANGELOG.md
93
CHANGELOG.md
|
@ -1,5 +1,98 @@
|
|||
# Changelog
|
||||
|
||||
## v6.1.0-preview.3 - 2018-06-07
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Clean up uses of `CommandTypes.Workflow` and `WorkflowInfo` (#6708)
|
||||
- Disallow Basic Auth over HTTP in PowerShell Remoting on Unix (#6787)
|
||||
- Change packaging to differentiate only between major versions and previews (#6968)
|
||||
- Enhance and refactor `Add-Type` cmdlet (#6141) (Thanks @iSazonov!)
|
||||
- A few error strings were removed and thus the corresponding fully-qualified error ids are not in use anymore.
|
||||
|
||||
### Engine Updates and Fixes
|
||||
|
||||
- Fix crash when terminal is reset (#6777)
|
||||
- Fix a module-loading regression that caused an infinite loop (#6843)
|
||||
- Further improve `PSMethod` to `Delegate` conversion (#6851)
|
||||
- Blacklist `System.Windows.Forms` from loading to prevent a crash (#6822)
|
||||
- Fix `Format-Table` where rows were being trimmed unnecessarily if there's only one row of headers (#6772)
|
||||
- Fix `SetDate` function in `libpsl-native` to avoid corrupting memory during `P/Invoke` (#6881)
|
||||
- Fix tab completions for hash table (#6839) (Thanks @iSazonov!)
|
||||
- Fix parser to continue parsing key-value pairs after an `If-Statement` value in a `HashExpression` (#7002)
|
||||
- Add error handling for `#requires` in an interactive session (#6469)
|
||||
|
||||
### General Cmdlet Updates and Fixes
|
||||
|
||||
- Improve parameter validation in `ExportCsvHelper` (#6816) (Thanks @sethvs!)
|
||||
- Quote `Multipart` form-data field names (#6782) (Thanks @markekraus!)
|
||||
- Fix Web Cmdlets for .NET Core 2.1 (#6806) (Thanks @markekraus!)
|
||||
- Fix `Set-Location DriveName:` to restore current working directory in the drive (#6774) (Thanks @mcbobke!)
|
||||
- Add the alias `-lp` for `-LiteralPath` parameters #6732 (#6770) (Thanks @kvprasoon!)
|
||||
- Remove `more` function and move the `$env:PAGER` capability into the `help` function (#6059) (Thanks @iSazonov!)
|
||||
- Add line break to the error message for `Set-ExecutionPolicy` (#6803) (Thanks @wesholton84!)
|
||||
|
||||
### Code Cleanup
|
||||
|
||||
- Clean up `#if SILVERLIGHT` (#6907) (Thanks @iSazonov!)
|
||||
- Clean up the unused method `NonWindowsGetDomainName()` (#6948) (Thanks @iSazonov!)
|
||||
- Clean up FileSystem provider (#6909) (Thanks @iSazonov!)
|
||||
|
||||
### Test
|
||||
|
||||
- Add tests for PowerShell hosting API to verify MyGet packages (#6737)
|
||||
- Remove Web Cmdlets tests using proxy environment variables (#6808) (Thanks @iSazonov!)
|
||||
- Enable Web Cmdlets tests for greater platform support (#6836) (Thanks @markekraus!)
|
||||
- Convert `ShouldBeErrorId` to `Should -Throw -ErrorId` in PowerShell tests (#6682)
|
||||
- Fix CIM cmdlets tests (#6755) (Thanks @sethvs!)
|
||||
- Add tests for PowerShell classes inheriting from abstract .NET classes (#6752)
|
||||
- Fix `Select-Object.Tests.ps1` which previously failed intermittently on Unix platforms. (#6747)
|
||||
- Update docker package tests to fix error on OpenSUSE 42 (#6783)
|
||||
- Fix test and infrastructure that block code coverage runs (#6790)
|
||||
- Update Tests `Isfile` to correct response for `"/"` (#6754) (Thanks @Patochun!)
|
||||
- Improve code coverage in `Export-Csv.Tests.ps1` (#6795) (Thanks @sethvs!)
|
||||
- Change `-Quiet` parameter of `Invoke-Pester` to `-Show None` in `OpenCover.psm1` (#6798) (Thanks @sethvs!)
|
||||
- Replace `Dbg.Assert` with `if () throw` in `CSVCommands.cs` (#6910) (Thanks @sethvs!)
|
||||
- Fix xUnit test `GetTempFileName` (#6943) (Thanks @iSazonov!)
|
||||
|
||||
### Build and Packaging Improvements
|
||||
|
||||
- Add Windows Compatibility Pack 2.0.0 to PowerShell Core and adopt the official .NET Core 2.1 (#6958)
|
||||
- Add Jumplist 'Run as Administrator' to Taskbar on Windows (#6913, #6985) (Thanks @bergmeister!)
|
||||
- Use AppVeyor matrix for faster Pull Request builds (#6945) (Thanks @bergmeister!)
|
||||
- Fix `build.psm1` to not add tool path to $PATH twice (#6834)
|
||||
- Add script to create a container manifest (#6735)
|
||||
- Fix docker manifest creation script to work with more complex tags and with repeated use (#6852)
|
||||
- Add functions to merge Pester and xUnit logs (#6854)
|
||||
- Enable generating full symbols for the Windows debug build (#6853)
|
||||
- Add functions into `build.psm1` to save and restore `PSOptions` between different sessions. (#6884)
|
||||
- Update signing XML based on new signing guidelines (#6893)
|
||||
- Update the release docker files to allow specifying the version of to-be-installed PowerShell and the version of image to use (#6835)
|
||||
- Updates docker files for Fedora 27 and Kali Linux (#6819)
|
||||
- Change packaging to support Ubuntu 17.10 and 18.04 (#6769)
|
||||
- Update `Get-ChangeLog` to make it more accurate (#6764)
|
||||
- Fix comparison to see if sudo test is needed in `install-*.sh` (#6771) (Thanks @bjh7242!)
|
||||
- Packaging: Add registry keys to support library folder background for explorer context menu (#6784) (Thanks @bergmeister!)
|
||||
- Skip `dotnet-cli` initialization and stop caching the `dotnet` folder for Travis CI (#7007)
|
||||
- Skip compiling the non-supported cmdlets on Unix in `System.Management.Automation.dll` to fix the crash in Unix debug build (#6939)
|
||||
- Use `PSReadLine` 2.0.0-beta2 from PSGallery (#6998)
|
||||
- Update `PSRP` Linux NuGet package version to 1.4.2-* (#6711)
|
||||
- Add path cleanup utility `Reset-PWSHSystemPath.ps1` (#6892) (Thanks @DarwinJS!)
|
||||
- Add logic to create signing XML for NuGet packages (#6921)
|
||||
- Add and config the `Settings.StyleCop` file (#6930, #6986) (Thanks @iSazonov!)
|
||||
- Fix the double curly bracket typo in a docker file (#6960) (Thanks @adelton!)
|
||||
- Remove dependencies on `libcurl` and `libunwind` in packaging to match the .NET Core behavior (#6964) (Thanks @qmfrederik!)
|
||||
- Make the docker build fail when the curl operation fails. (#6961) (Thanks @adelton!)
|
||||
|
||||
### Documentation and Help Content
|
||||
|
||||
- Update installation doc about Raspbian (#6859)
|
||||
- Add code coverage report generation instructions (#6515)
|
||||
- Migrate docs from PowerShell repository to Docs repository (#6899)
|
||||
- Fix broken links due to migrating GitHub docs on Installation, Known Issues and Breaking Changes to `docs.microsoft.com` (#6981) (Thanks @bergmeister!)
|
||||
- Update documentation on how to write tests verifying errors conditions (#6687)
|
||||
- Fix preview download links in `README.md` (#6762)
|
||||
|
||||
## v6.1.0-preview.2 - 2018-04-27
|
||||
|
||||
### Breaking Changes
|
||||
|
|
40
README.md
40
README.md
|
@ -29,7 +29,8 @@ You can download and install a PowerShell package for any of the following platf
|
|||
| -------------------------------------------| ------------------------| ----------------------| ------------------------------|
|
||||
| [Windows (x64)][corefx-win] | [.msi][rl-windows-64] | [.msi][pv-windows-64] | [Instructions][in-windows] |
|
||||
| [Windows (x86)][corefx-win] | [.msi][rl-windows-86] | [.msi][pv-windows-86] | [Instructions][in-windows] |
|
||||
| [Ubuntu 17.04][corefx-linux] | [.deb][rl-ubuntu17] | [.deb][pv-ubuntu17] | [Instructions][in-ubuntu17] |
|
||||
| [Ubuntu 18.04][corefx-linux] | | [.deb][pv-ubuntu18] | [Instructions][in-ubuntu18] |
|
||||
| [Ubuntu 17.10][corefx-linux] | | [.deb][pv-ubuntu17] | [Instructions][in-ubuntu17] |
|
||||
| [Ubuntu 16.04][corefx-linux] | [.deb][rl-ubuntu16] | [.deb][pv-ubuntu16] | [Instructions][in-ubuntu16] |
|
||||
| [Ubuntu 14.04][corefx-linux] | [.deb][rl-ubuntu14] | [.deb][pv-ubuntu14] | [Instructions][in-ubuntu14] |
|
||||
| [Debian 8.7+][corefx-linux] | [.deb][rl-debian8] | [.deb][pv-debian8] | [Instructions][in-deb8] |
|
||||
|
@ -62,7 +63,6 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu
|
|||
|
||||
[rl-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/PowerShell-6.0.2-win-x64.msi
|
||||
[rl-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/PowerShell-6.0.2-win-x86.msi
|
||||
[rl-ubuntu17]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell_6.0.2-1.ubuntu.17.04_amd64.deb
|
||||
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell_6.0.2-1.ubuntu.16.04_amd64.deb
|
||||
[rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell_6.0.2-1.ubuntu.14.04_amd64.deb
|
||||
[rl-debian8]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell_6.0.2-1.debian.8_amd64.deb
|
||||
|
@ -78,27 +78,29 @@ You can also download the PowerShell binary archives for Windows, macOS and Linu
|
|||
[rl-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell-6.0.2-linux-x64.tar.gz
|
||||
[rl-raspbian]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell-6.0.2-linux-arm32.tar.gz
|
||||
|
||||
[pv-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-x64.msi
|
||||
[pv-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-x86.msi
|
||||
[pv-ubuntu17]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell_6.1.0-preview.2-1.ubuntu.17.04_amd64.deb
|
||||
[pv-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell_6.1.0-preview.2-1.ubuntu.16.04_amd64.deb
|
||||
[pv-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell_6.1.0-preview.2-1.ubuntu.14.04_amd64.deb
|
||||
[pv-debian8]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell_6.1.0-preview.2-1.debian.8_amd64.deb
|
||||
[pv-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell_6.1.0-preview.2-1.debian.9_amd64.deb
|
||||
[pv-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell-6.1.0-preview.2-1.rhel.7.x86_64.rpm
|
||||
[pv-macos]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell-6.1.0-preview.2-osx.10.12-x64.pkg
|
||||
[pv-winarm]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-arm32.zip
|
||||
[pv-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-arm64.zip
|
||||
[pv-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-x86.zip
|
||||
[pv-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/PowerShell-6.1.0-preview.2-win-x64.zip
|
||||
[pv-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell-6.1.0-preview.2-osx-x64.tar.gz
|
||||
[pv-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell-6.1.0-preview.2-linux-x64.tar.gz
|
||||
[pv-raspbian]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.2/powershell-6.1.0-preview.2-linux-arm32.tar.gz
|
||||
[pv-windows-64]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/PowerShell-6.1.0-preview.3-win-x64.msi
|
||||
[pv-windows-86]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/PowerShell-6.1.0-preview.3-win-x86.msi
|
||||
[pv-ubuntu18]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview_6.1.0-preview.3-1.ubuntu.18.04_amd64.deb
|
||||
[pv-ubuntu17]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview_6.1.0-preview.3-1.ubuntu.17.10_amd64.deb
|
||||
[pv-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview_6.1.0-preview.3-1.ubuntu.16.04_amd64.deb
|
||||
[pv-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview_6.1.0-preview.3-1.ubuntu.14.04_amd64.deb
|
||||
[pv-debian8]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview_6.1.0-preview.3-1.debian.8_amd64.deb
|
||||
[pv-debian9]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview_6.1.0-preview.3-1.debian.9_amd64.deb
|
||||
[pv-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-preview-6.1.0-preview.3-1.rhel.7.x86_64.rpm
|
||||
[pv-macos]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-6.1.0-preview.3-osx.10.12-x64.pkg
|
||||
[pv-winarm]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/PowerShell-6.1.0-preview.3-win-arm32.zip
|
||||
[pv-winarm64]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/PowerShell-6.1.0-preview.3-win-arm64.zip
|
||||
[pv-winx86-zip]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/PowerShell-6.1.0-preview.3-win-x86.zip
|
||||
[pv-winx64-zip]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/PowerShell-6.1.0-preview.3-win-x64.zip
|
||||
[pv-macos-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-6.1.0-preview.3-osx-x64.tar.gz
|
||||
[pv-linux-tar]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-6.1.0-preview.3-linux-x64.tar.gz
|
||||
[pv-raspbian]: https://github.com/PowerShell/PowerShell/releases/download/v6.1.0-preview.3/powershell-6.1.0-preview.3-linux-arm32.tar.gz
|
||||
|
||||
[in-windows]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-windows?view=powershell-6
|
||||
[in-ubuntu14]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1404
|
||||
[in-ubuntu16]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1604
|
||||
[in-ubuntu17]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1704
|
||||
[in-ubuntu17]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1710
|
||||
[in-ubuntu18]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1804
|
||||
[in-deb8]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#debian-8
|
||||
[in-deb9]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#debian-9
|
||||
[in-centos]: https://docs.microsoft.com/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6#centos-7
|
||||
|
|
|
@ -1671,7 +1671,7 @@ function Start-PSBootstrap {
|
|||
if($Environment.IsMacOS) {
|
||||
$gemsudo = $sudo
|
||||
}
|
||||
Start-NativeExecution ([ScriptBlock]::Create("$gemsudo gem install fpm -v 1.9.3"))
|
||||
Start-NativeExecution ([ScriptBlock]::Create("$gemsudo gem install fpm -v 1.10.0"))
|
||||
Start-NativeExecution ([ScriptBlock]::Create("$gemsudo gem install ronn -v 0.7.3"))
|
||||
} catch {
|
||||
Write-Warning "Installation of fpm and ronn gems failed! Must resolve manually."
|
||||
|
@ -2094,7 +2094,7 @@ function script:Start-NativeExecution
|
|||
try {
|
||||
if($VerboseOutputOnError.IsPresent)
|
||||
{
|
||||
$output = & $sb
|
||||
$output = & $sb 2>&1
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2599,10 +2599,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
if (ShouldProcess(resource, action))
|
||||
{
|
||||
// Use the parent directory to create the sub-directory
|
||||
|
||||
DirectoryInfo parentDirectory = new DirectoryInfo(parentPath);
|
||||
DirectoryInfo result = parentDirectory.CreateSubdirectory(childName);
|
||||
var result = Directory.CreateDirectory(Path.Combine(parentPath, childName));
|
||||
|
||||
if (streamOutput)
|
||||
{
|
||||
|
|
|
@ -1396,3 +1396,21 @@ Describe "Remove-Item UnAuthorized Access" -Tags "CI", "RequireAdminOnWindows" {
|
|||
Get-Content $errorFile | Should -BeExactly 'RemoveItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.RemoveItemCommand'
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Verify sub-directory creation under root" -Tag 'CI','RequireSudoOnUnix' {
|
||||
BeforeAll {
|
||||
$dirPath = "\TestDir-$((New-Guid).Guid)"
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
if(Test-Path $dirPath)
|
||||
{
|
||||
Remove-Item -Path $dirPath -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
It "Can create a sub directory under root path" {
|
||||
New-Item -Path $dirPath -ItemType Directory -Force > $null
|
||||
$dirPath | Should -Exist
|
||||
}
|
||||
}
|
||||
|
|
|
@ -452,7 +452,7 @@ function New-PSSignedBuildZip
|
|||
# Replace unsigned binaries with signed
|
||||
$signedFilesFilter = Join-Path -Path $signedFilesPath -ChildPath '*'
|
||||
Get-ChildItem -path $signedFilesFilter -Recurse -File | Select-Object -ExpandProperty FullName | Foreach-Object -Process {
|
||||
$relativePath = $_.Replace($signedFilesPath,'')
|
||||
$relativePath = $_.ToLowerInvariant().Replace($signedFilesPath.ToLowerInvariant(),'')
|
||||
$destination = Join-Path -Path $buildPath -ChildPath $relativePath
|
||||
Write-Log "replacing $destination with $_"
|
||||
Copy-Item -Path $_ -Destination $destination -force
|
||||
|
@ -618,7 +618,7 @@ function New-UnixPackage {
|
|||
$IsPreview = Test-IsPreview -Version $Version
|
||||
|
||||
# Preview versions have preview in the name
|
||||
$Name = if ($IsPreview) { "powershell-preview" } else { "powershell" }
|
||||
$Name = if ($IsPreview -and $Environment.IsLinux) { "powershell-preview" } else { "powershell" }
|
||||
|
||||
# Verify dependencies are installed and in the path
|
||||
Test-Dependencies
|
||||
|
@ -655,15 +655,17 @@ function New-UnixPackage {
|
|||
|
||||
if($pscmdlet.ShouldProcess("Create package file system"))
|
||||
{
|
||||
# refers to executable, does not vary by channel
|
||||
New-Item -Force -ItemType SymbolicLink -Path $linkSource -Target "$Destination/pwsh" >$null
|
||||
|
||||
# Generate After Install and After Remove scripts
|
||||
$AfterScriptInfo = New-AfterScripts
|
||||
$AfterScriptInfo = New-AfterScripts -Link $Link
|
||||
|
||||
# there is a weird bug in fpm
|
||||
# if the target of the powershell symlink exists, `fpm` aborts
|
||||
# with a `utime` error on macOS.
|
||||
# so we move it to make symlink broken
|
||||
# refers to executable, does not vary by channel
|
||||
$symlink_dest = "$Destination/pwsh"
|
||||
$hack_dest = "./_fpm_symlink_hack_powershell"
|
||||
if ($Environment.IsMacOS) {
|
||||
|
@ -674,14 +676,15 @@ function New-UnixPackage {
|
|||
}
|
||||
|
||||
# Generate gzip of man file
|
||||
$ManGzipInfo = New-ManGzip
|
||||
$ManGzipInfo = New-ManGzip -IsPreview:$IsPreview
|
||||
|
||||
# Change permissions for packaging
|
||||
Start-NativeExecution {
|
||||
find $Staging -type d | xargs chmod 755
|
||||
find $Staging -type f | xargs chmod 644
|
||||
chmod 644 $ManGzipInfo.GzipFile
|
||||
chmod 755 "$Staging/pwsh" # only the executable should be executable
|
||||
# refers to executable, does not vary by channel
|
||||
chmod 755 "$Staging/pwsh" #only the executable file should be granted the execution permission
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1058,6 +1061,12 @@ function Test-Dependencies
|
|||
|
||||
function New-AfterScripts
|
||||
{
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]
|
||||
$Link
|
||||
)
|
||||
|
||||
if ($Environment.IsRedHatFamily) {
|
||||
# add two symbolic links to system shared libraries that libmi.so is dependent on to handle
|
||||
# platform specific changes. This is the only set of platforms needed for this currently
|
||||
|
@ -1068,14 +1077,14 @@ function New-AfterScripts
|
|||
|
||||
$AfterInstallScript = [io.path]::GetTempFileName()
|
||||
$AfterRemoveScript = [io.path]::GetTempFileName()
|
||||
$packagingStrings.RedHatAfterInstallScript -f "$Link/pwsh" | Out-File -FilePath $AfterInstallScript -Encoding ascii
|
||||
$packagingStrings.RedHatAfterRemoveScript -f "$Link/pwsh" | Out-File -FilePath $AfterRemoveScript -Encoding ascii
|
||||
$packagingStrings.RedHatAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii
|
||||
$packagingStrings.RedHatAfterRemoveScript -f "$Link" | Out-File -FilePath $AfterRemoveScript -Encoding ascii
|
||||
}
|
||||
elseif ($Environment.IsUbuntu -or $Environment.IsDebian -or $Environment.IsSUSEFamily) {
|
||||
$AfterInstallScript = [io.path]::GetTempFileName()
|
||||
$AfterRemoveScript = [io.path]::GetTempFileName()
|
||||
$packagingStrings.UbuntuAfterInstallScript -f "$Link/pwsh" | Out-File -FilePath $AfterInstallScript -Encoding ascii
|
||||
$packagingStrings.UbuntuAfterRemoveScript -f "$Link/pwsh" | Out-File -FilePath $AfterRemoveScript -Encoding ascii
|
||||
$packagingStrings.UbuntuAfterInstallScript -f "$Link" | Out-File -FilePath $AfterInstallScript -Encoding ascii
|
||||
$packagingStrings.UbuntuAfterRemoveScript -f "$Link" | Out-File -FilePath $AfterRemoveScript -Encoding ascii
|
||||
}
|
||||
|
||||
return [PSCustomObject] @{
|
||||
|
@ -1086,16 +1095,33 @@ function New-AfterScripts
|
|||
|
||||
function New-ManGzip
|
||||
{
|
||||
param(
|
||||
[switch]
|
||||
$IsPreview
|
||||
)
|
||||
|
||||
# run ronn to convert man page to roff
|
||||
$RonnFile = Join-Path $PSScriptRoot "/../../assets/pwsh.1.ronn"
|
||||
if($IsPreview.IsPresent)
|
||||
{
|
||||
$newRonnFile = $RonnFile -replace 'pwsh', 'pwsh-preview'
|
||||
Copy-Item -Path $RonnFile -Destination $newRonnFile -force
|
||||
$RonnFile = $newRonnFile
|
||||
}
|
||||
|
||||
$RoffFile = $RonnFile -replace "\.ronn$"
|
||||
|
||||
# Run ronn on assets file
|
||||
Start-NativeExecution { ronn --roff $RonnFile }
|
||||
Start-NativeExecution { ronn --roff $RonnFile } -VerboseOutputOnError
|
||||
|
||||
if($IsPreview.IsPresent)
|
||||
{
|
||||
Remove-item $RonnFile
|
||||
}
|
||||
|
||||
# gzip in assets directory
|
||||
$GzipFile = "$RoffFile.gz"
|
||||
Start-NativeExecution { gzip -f $RoffFile }
|
||||
Start-NativeExecution { gzip -f $RoffFile } -VerboseOutputOnError
|
||||
|
||||
$ManFile = Join-Path "/usr/local/share/man/man1" (Split-Path -Leaf $GzipFile)
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
<file src="__INPATHROOT__\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1" signType="Authenticode" dest="__OUTPATHROOT__\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1" />
|
||||
<file src="__INPATHROOT__\Modules\PSDiagnostics\PSDiagnostics.psd1" signType="Authenticode" dest="__OUTPATHROOT__\Modules\PSDiagnostics\PSDiagnostics.psd1" />
|
||||
<file src="__INPATHROOT__\Modules\PSDiagnostics\PSDiagnostics.psm1" signType="Authenticode" dest="__OUTPATHROOT__\Modules\PSDiagnostics\PSDiagnostics.psm1" />
|
||||
<file src="__INPATHROOT__\Modules\PSReadLine\PSReadLine.psd1" signType="Authenticode" dest="__OUTPATHROOT__\Modules\PSReadLine\PSReadLine.psd1" />
|
||||
<file src="__INPATHROOT__\Modules\PSReadLine\PSReadLine.psm1" signType="Authenticode" dest="__OUTPATHROOT__\Modules\PSReadLine\PSReadLine.psm1" />
|
||||
<file src="__INPATHROOT__\Modules\Microsoft.WSMan.Management\WSMan.format.ps1xml" signType="Authenticode" dest="__OUTPATHROOT__\Modules\Microsoft.WSMan.Management\WSMan.format.ps1xml" />
|
||||
<file src="__INPATHROOT__\Modules\Microsoft.PowerShell.Diagnostics\Event.format.ps1xml" signType="Authenticode" dest="__OUTPATHROOT__\Modules\Microsoft.PowerShell.Diagnostics\Event.format.ps1xml" />
|
||||
<file src="__INPATHROOT__\Modules\Microsoft.PowerShell.Diagnostics\GetEvent.types.ps1xml" signType="Authenticode" dest="__OUTPATHROOT__\Modules\Microsoft.PowerShell.Diagnostics\GetEvent.types.ps1xml" />
|
||||
|
|
Loading…
Reference in a new issue