Commit graph

5785 commits

Author SHA1 Message Date
Dongbo Wang 3dd86f5148 Refactor 'PropertyAccessor.cs'
- Remove the unneeded base type;
- Rename 'ConfigPropertyAccessor' to 'PowerShellConfig';
- Move 'PowerShellConfig' to the namespace 'System.Management.Automation.Configuration'
2018-01-04 13:40:50 -08:00
Dongbo Wang 39af334f9f Enable logging on Linux through MshLog 2018-01-04 13:40:34 -08:00
Dan Travison 5488131931 remoting: Handle DLLImport failure of libpsrpclient (#5622)
Issue #4029 exposed two problems when failing to load libpsrpclient.

WSManAPIDataCommon.ctor was not identifying the binary that failed DLLImport; hindering diagnosability
PrioritySendDataCollection.Clear() would throw a NullReferenceException when called from the finalizer after an error path.
This change addresses both of the above:

Guard against null arrays in PrioritySendDataCollection.Clear() - called from finalizer in error paths.

Diagnosability: Log the DllNotFoundException in WSManAPIDataCommon ctor and also include it as the internal exception when throwing PSRemotingTransportException.
2018-01-04 13:08:33 -08:00
Dan Travison b057d4545d Build: Update Restore-PSPester to include the fix for nested describe errors (#5771)
Update Restore-PSPester to include PR PowerShell/psl-pester#12 that fixes PowerShell/psl-pester#11 - unhandled exceptions in before/after bypasses Pester's enddescribe logic.  
Update to the latest, while we are at it.
2018-01-03 15:44:25 -08:00
Chris 5f171963b5 Fail AppVeyor Build if MSI does not build (#5755)
Before this PR, when a WiX compilation error occurs then an error is thrown, which appears in the log with details but the AppVeyor build itself is still marked as green.
This PR makes the console host also return an exit code of -1 when being run on AppVeyor so that it can then interpret it as a build failure and mark the build as red. It uses the fact that AppVeyor defines an environment variable named CI. Exiting is OK since the MSI build is the last step in CI and nothing happens after that.
The git history shows a test build that proves that this works if the installer was broken.
2018-01-02 15:08:32 -08:00
Chris 238ff90d72 Cleanup temporarily created WiX files after compilation to be able to have a clean re-build (#5757)
When changing the WiX installer locally and rebuilding the MSI one can get into the terrible situation whereby a code change does not get compiled into the new MSI.
This PR fixes the root cause of it, which is due to temporary WiX files that are created but not deleted after compilation and WiX then somehow decides to not recompile properly.

I also removed redundant parenthesis of surrounding code.
2018-01-02 11:33:43 -08:00
Travis Plunk 359a3f078e
tools: fix install-powershell for running during window setup (#5727)
Set the system path instead of the user path so that all users can use the installation
    If the required destination folder doesn't exist, create it
2018-01-02 11:13:31 -08:00
Dongbo Wang ad231a8a7f
Make minor fixes in Compiler to properly handle void type expression (#5764) 2018-01-02 09:25:29 -08:00
Ilya 7257404929
Add Count and Length properties to [PSCustomobject] (#5745)
Related #3671
•Add Count and Length properties to [PSCustomobject].
 Now following returns 1:
 ([pscustomobject] @{ foo = 'bar' }).Count
 ([pscustomobject] @{ foo = 'bar' }).Length
•Add tests
2017-12-28 10:15:06 +04:00
Dongbo Wang dab51c7f40 Automate the generation of release change log draft (#5712)
Create the module 'releaseTools.psm1' under 'tools' folder, which expose the function 'Get-ChangeLog' to generate a release change log based on the local commit history.
2017-12-20 16:43:33 -08:00
Mark Kraus 52cadf93c9 [Feature] Replace lee.io Tests with WebListener. (#5709) 2017-12-20 16:43:33 -08:00
Dongbo Wang c17a975683
Automate the generation of release change log draft (#5712)
Create the module 'releaseTools.psm1' under 'tools' folder, which expose the function 'Get-ChangeLog' to generate a release change log based on the local commit history.
2017-12-19 13:39:36 -08:00
Luke Anderson 077bf97d4c Change Github to GitHub in CONTRIBUTING.md (#5697)
Correct branding is important.
2017-12-19 11:21:40 -08:00
SwarfegaGit 65744fb30c Fixed incorrect release date on the changelog (#5698)
Was showing November but should be December.
2017-12-19 11:21:40 -08:00
Steve Lee 5058894be3 Add instructions to deploy win-arm build on Windows IoT (#5682) 2017-12-19 11:21:40 -08:00
Andrew 690e968509 Update the docker based release package tests (#5692) 2017-12-19 11:21:40 -08:00
Mark Kraus acf68f462c Replace Remaining HttpBin.org Tests with WebListener (#5665)
•Replaces all remaining test that rely on httpbin.org
•Adds Put, Post, Patch, and Delete tests to WebListener by means of routes to Get test and modifications to the Get controller.
•Adds responsephrase option to the Response test to accommodate error message tests
•removed redundant GET tests from irm and iwr tests.
•Fixed markdown linting errors in README.md for WebListener
2017-12-19 11:21:40 -08:00
Mark Kraus 79ae396917 [Feature] Replace lee.io Tests with WebListener. (#5709) 2017-12-19 08:29:46 +04:00
Luke Anderson 181ce37a9c Change Github to GitHub in CONTRIBUTING.md (#5697)
Correct branding is important.
2017-12-18 23:23:00 +04:00
SwarfegaGit 1ae5042965 Fixed incorrect release date on the changelog (#5698)
Was showing November but should be December.
2017-12-18 23:20:42 +04:00
Steve Lee 462833b76e Add instructions to deploy win-arm build on Windows IoT (#5682) 2017-12-15 14:05:20 -08:00
Andrew 57a4cfcac6 Update the docker based release package tests (#5692) 2017-12-15 13:59:12 -08:00
Travis Plunk 7924224f77 Merge branch '6.0.0-upstream' into merge_rc2_to_master
# Conflicts:
#	README.md
#	docker/tests/container.tests.ps1
#	test/tools/WebListener/Controllers/ResponseController.cs
#	test/tools/WebListener/README.md
#	tools/appveyor.psm1
#	tools/travis.ps1
#   docs/linux.md
#   CHANGELOG.md
2017-12-14 15:29:59 -08:00
Travis Plunk 02cc3db3fb
Update scripts and documentation with RC.2 version (#5688) 2017-12-14 13:15:19 -08:00
Travis Plunk 092413ae58 Update change log for 6.0.0-rc.2 release (#5687) 2017-12-14 09:06:12 -08:00
Mark Kraus 19197e11f3 Replace Remaining HttpBin.org Tests with WebListener (#5665)
•Replaces all remaining test that rely on httpbin.org
•Adds Put, Post, Patch, and Delete tests to WebListener by means of routes to Get test and modifications to the Get controller.
•Adds responsephrase option to the Response test to accommodate error message tests
•removed redundant GET tests from irm and iwr tests.
•Fixed markdown linting errors in README.md for WebListener
2017-12-13 19:28:05 +04:00
Travis Plunk 2b9059b9c0 Make the experience better when start-pspester doesn't find pester (#5673)
refactor code to restore pester into a separate function called Restore-PSPester
update message on what to do when pester is missing
Add ability for get-psoptions to default to new-psoptions
fix an issue with publish-pstesttools when a build has not been run since build.psm1 has been imported (try to use the default options)
make start-pspester use the last build, not just use the default options
fix an issue in restore caused some files not to be removed
2017-12-12 16:16:10 -08:00
Dongbo Wang 48961a5f68 Update PowerShell to build with .NET Core runtime 2.0.4 (#5677) 2017-12-12 16:16:10 -08:00
Travis Plunk 6ef94c1dfe
Make the experience better when start-pspester doesn't find pester (#5673)
refactor code to restore pester into a separate function called Restore-PSPester
update message on what to do when pester is missing
Add ability for get-psoptions to default to new-psoptions
fix an issue with publish-pstesttools when a build has not been run since build.psm1 has been imported (try to use the default options)
make start-pspester use the last build, not just use the default options
fix an issue in restore caused some files not to be removed
2017-12-12 16:07:12 -08:00
Dongbo Wang d966f59a11
Update PowerShell to build with .NET Core runtime 2.0.4 (#5677) 2017-12-12 13:53:22 -08:00
Dongbo Wang f11b9ed794 Update packaging and release build scripts to produce zip packages for win-arm/win-arm64 (#5664)
Note: changes in tools/appveyor.psm1 are not moved to the 6.0.0 branch because:
   - the change is to produce win-arm32/win-arm64 zip packages in daily builds.
     Since we don't have daily build for the 6.0.0 branch, the change is not needed.
   - there are conflicts when cherry-picking the commits
2017-12-11 20:46:33 -08:00
Steve Lee 64647c25f4 Updated doc to build arm/arm64 versions of psrp.windows and PowerShell.Core.Instrumentation.dll libraries (#5668) 2017-12-11 20:46:33 -08:00
Travis Plunk 34ddf425c2 tools: enable install-debian to work with VSTS Hosted Linux Preview (#5659)
Added -skip-sudo-check, because the check fails in VSTS Hosted Linux Preview even though sudo works.
2017-12-11 20:46:33 -08:00
Dongbo Wang 4dc5512c83
Update packaging and release build scripts to produce zip packages for win-arm/win-arm64 (#5664) 2017-12-11 13:57:02 -08:00
Steve Lee 78271eb76e Updated doc to build arm/arm64 versions of psrp.windows and PowerShell.Core.Instrumentation.dll libraries (#5668) 2017-12-11 13:48:24 -08:00
Travis Plunk 2a9c1cad00
tools: enable install-debian to work with VSTS Hosted Linux Preview (#5659)
Added -skip-sudo-check, because the check fails in VSTS Hosted Linux Preview even though sudo works.
2017-12-11 10:28:43 -08:00
Dongbo Wang c3e5e35892 Fix the Linux release build (#5660)
The Linux release build was broken because AppImage,tar,tar-arm in build.json is turned into a string of "AppImage,tar,tar-arm" by docker run. Now it's changed to use switch parameters.
2017-12-10 10:29:53 -08:00
Steve Lee e2dc0eafbc build: Enable building for win-arm and win-arm64 (#5524)
* enable win-arm and win-arm64 builds

* fix using arm64 tools for build
fix finding vs2017 dynamically

* change install-powershellremoting.ps1 script to use reg provider rather than reg.exe so that error doesn't show on success
fix formatting issue in cmake.defs

* add check that path being read from config file is valid
address PR feedback

* fix copying of PowerShell.Core.Instrumentation as VS2017 puts it in $HOME/source
address PR feedback
2017-12-10 10:29:53 -08:00
Dongbo Wang bfa017d998 Add linux-arm tarball package to release build (#5652)
Create linux-arm tarball package in our release build.
Also moved the Linux-x64 tarball creation to Ubutntu 14.04, because Start-PSBuild adds additional symbolic link files when running on Red Hat Family distros.
Note that linux-arm can only be built on Ubuntu, so the tar-arm package will also be generated from the Ubuntu 14.04.
2017-12-10 10:29:53 -08:00
Travis Plunk d380317a4d Add comment about 'productbuild' used in packaging script (#5654) 2017-12-10 10:29:53 -08:00
Travis Plunk 1ce6c39c0b contribution guidelines: Add work in progress guidance (#5655)
Add guidance for submitting PR which are not ready to merge, or work in progress (WIP)
2017-12-10 10:29:53 -08:00
Aditya Patwardhan 9747bf4d7e Get GitCommitId using the ProductVersion from Assembly (#5651) 2017-12-10 10:29:53 -08:00
Travis Plunk 322724e1f2 Packaging: make mac package require 10.12 or newer (#5649)
Fixes #4290
Make mac package require 10.12 or newer.
Required that the package is installed to a disk with macOS installed.
The Apple example XML had a background image added as well, so I added a background image:
https://user-images.githubusercontent.com/10873629/33738943-014c9d00-db50-11e7-9628-310ce6427438.png
2017-12-10 10:29:53 -08:00
Travis Plunk 64eab39af5 update signing subjects (#5650)
fixes #5642
Update the signing subject for the windows package and windows files
2017-12-10 10:29:53 -08:00
Dongbo Wang 4edfebd69f Fix the Linux release build (#5660)
The Linux release build was broken because AppImage,tar,tar-arm in build.json is turned into a string of "AppImage,tar,tar-arm" by docker run. Now it's changed to use switch parameters.
2017-12-09 13:32:37 -08:00
Steve Lee eb254280fb build: Enable building for win-arm and win-arm64 (#5524)
* enable win-arm and win-arm64 builds

* fix using arm64 tools for build
fix finding vs2017 dynamically

* change install-powershellremoting.ps1 script to use reg provider rather than reg.exe so that error doesn't show on success
fix formatting issue in cmake.defs

* add check that path being read from config file is valid
address PR feedback

* fix copying of PowerShell.Core.Instrumentation as VS2017 puts it in $HOME/source
address PR feedback
2017-12-08 15:43:53 -08:00
Dongbo Wang 7f94b6e8bd Add linux-arm tarball package to release build (#5652)
Create linux-arm tarball package in our release build.
Also moved the Linux-x64 tarball creation to Ubutntu 14.04, because Start-PSBuild adds additional symbolic link files when running on Red Hat Family distros.
Note that linux-arm can only be built on Ubuntu, so the tar-arm package will also be generated from the Ubuntu 14.04.
2017-12-08 14:17:52 -08:00
Travis Plunk abb6117b96 Add comment about 'productbuild' used in packaging script (#5654) 2017-12-08 13:47:54 -08:00
Travis Plunk ef75040846
contribution guidelines: Add work in progress guidance (#5655)
Add guidance for submitting PR which are not ready to merge, or work in progress (WIP)
2017-12-08 12:14:00 -08:00
Aditya Patwardhan 0bcc2a2a8f Get GitCommitId using the ProductVersion from Assembly (#5651) 2017-12-08 11:37:29 -08:00