Commit graph

345 commits

Author SHA1 Message Date
Travis Plunk 1d64cad068
Signing fixes (#5439)
* Add two files that need to be signed
* make sure to set PSModuleRestore to true when expanding a signed build because we run PSModuleRestore at that point.
* suppress output of CmdLets which are noisy
2017-11-14 10:30:17 -08:00
Travis Plunk 36fac11f29 Allow packaging from a zip package to allow for signing (#5418)
- Include a serialized version of PSOptions in an includesymbols zip
- Add a function which will create a zip package from the expanded includesymbols zip and a folder of signed files
- Add a function to restore an includesymbols zip as a build and populated PSOptions with the options
2017-11-13 10:10:51 -08:00
Steve Lee 0f223c00d2 Move the 'rcedit' step to build rather than packaging (#5404) 2017-11-11 10:32:10 -08:00
Dongbo Wang affcc40a52
Add 'install-powershell.ps1' to install powershell core on windows (#5383)
- Add install-powershell.ps1 to install powershell core packages on windows.
- Update Start-PSBootStrap to check and install the latest PSCore package on Windows.
2017-11-10 08:28:02 -08:00
Keith Hill 34600c4100 Update Find-Dotnet to find dotnet with compat SDK (#5341)
Fix #5260 - with this fix folks shouldn't hit the version mismatch check.

The approach is to see if the dotnet in the current PATH has a compatible SDK.  Folks will have a globall installed dotnet if they've installed VS, VSCode C# ext or have  installed the .NET Core SDK.  This verion may not have the SDK required by PSCore.  And the global cannot see user local dotnet SDK installs.  So if the global dotnet doesn't have the right SDK, we prepend the path to the user's local dotnet dir.

Also, updateed $dotnetCLIRequiredVersion to read its value from global.json so there is one less source of the truth (for the SDK version).
2017-11-09 16:28:39 -08:00
Dan Travison 3bfae4f1dd Rename/Update PowerShell ETW manifest to remove the Windows PowerShell dependency. (#5360)
- Build PowerShell.Core.Instrumentation.dll - Resource-only binary for the ETW resources.
- Create a registration script for registering/unregistering the ETW provider.
2017-11-09 09:23:00 -08:00
bergmeister 6b700bbcc6 Update Wix toolset download link to newer version 3.11 (#5339)
This makes it also future proof since codeplex is going to get deprecated.
2017-11-06 10:32:00 -08:00
Dongbo Wang ef00088ade
Separate Install-PowerShellRemoting.ps1 from psrp.windows nuget package (#5330) 2017-11-03 14:45:07 -07:00
Dongbo Wang decdd1a828 Update powershell to use 2.0.4-servicing dotnet core runtime (#5295) 2017-11-02 14:12:19 -07:00
Travis Plunk 8fcdc01827
Refactor for signing (#5300) 2017-11-02 13:52:17 -07:00
Steve Lee beef5bc84a set requestedExecutionLevel to asInvoker for pwsh.exe on Windows (#5285) 2017-11-01 14:12:39 -07:00
Steve Lee 4df703616a use rcedit to embed icon and version information into pwsh.exe (#5178)
pwsh.exe today doesn't contain file version information and the icon is only associated with the shortcut file and not the exe

Fix is to use rcedit to embed:

icon
product version
file version
product name
copyright
Fix #2883
Fix #5166
Fix #5034
2017-10-26 21:52:08 -07:00
Aditya Patwardhan d0806811e4 Update docs and scripts for beta.9 (#5217) 2017-10-24 16:28:22 -07:00
Steve Lee 2cc091115b Rename powershell.exe to pwsh.exe (#5101)
- Rename powershell.exe to pwsh.exe
- Fixe appveyor.psm1
- Update MSI to include 'pwsh' in path and app paths
- Revert change for hyper-v powershell direct
- Update names in packaging.psm1.
- Fix check for SxS
2017-10-17 17:25:11 -07:00
PetSerAl cd7ac4d436 Try to locate dotnet before installing it (#5059) 2017-10-10 14:01:01 -07:00
David Weber 42e8deb969 Add warning to Start-PSPester if Pester module not found (#5069)
Currently, if a user does not clone with the `--recursive` flag or run `git submodule update --init`, `Start-PSPester` will fail to run due to the missing Pester module. While the error hints at the Pester module not being found, there is no suggested way of fixing the issue presented to the user.
This change makes a helpful warning to appear at the beginning of the execution of `Start-PSPester` if the Pester module cannot be found.
2017-10-10 12:37:17 -07:00
Dongbo Wang 718a6722c9 Fix Linux packages (#4994)
* Build one deb package for each Debian distro
* Build all deb packages with a single run of script
2017-10-03 14:29:43 -07:00
Dongbo Wang fa170a7e00 Suppress the output of building test tools in Compress-TestContent (#4957)
When uploading CodeCoverage artifacts, `Compress-TestContent` is called which calls `Publish-PSTestTools` to build test tools. The build output was captured by `$codeCoverageArtifacts` which causes `Push-AppveyorArtifact` to spit out a lot of errors. The issue is fixed by this change.
2017-10-02 12:14:19 -07:00
Dongbo Wang a4b8dd0a23 Remove Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.dll (#4868)
The code in `AssemblyLoadContext.dll` doesn't need to be in a separate DLL anymore.
S.M.A.dll depends on `AssemblyLoadContext.dll`, so keeping that code out of S.M.A.dll doesn't help make S.M.A smaller size or less dependent. So the code in `AssemblyLoadContext.dll` is moved to `S.M.A.dll` and then we remove `AssemblyLoadContext.dll`.

The changes are:
- Move `CorePsAssemblyLoadContext.cs` to `src\S.M.A\CoreCLR\`
- Update `CorePsAssemblyLoadContext.cs` to get the test took moved to `Utils.InternalTestHooks` and update tests
- Update `build.psm1` and `.csproj` accrodingly
- Update `pwrshcommon.cpp` to remove `AssemblyLoadContext.dll` from the TPA list.
- `S.M.A.AssemblyExtensions` is removed as `PackageManagement` has finished their move to .NET Core 2.0. (I will work with Bryan to get the latest version uploaded to powershell-core)
2017-09-29 17:26:55 -07:00
Ilya 6e77537181 Get 'PSVersion' and 'GitCommitId' from the 'ProductVersion' attribute of assembly (#4863) 2017-09-28 09:27:43 -07:00
Dongbo Wang bb3a840e76 Create generic Linux-x64 packages that are portable to all supported Linux distros (#4902) 2017-09-25 12:49:43 -07:00
Steve Lee 9791116979 reduce output of pester for CI (#4855) 2017-09-19 14:56:32 -07:00
Dongbo Wang 192803bfcf Build powershell core using the generic RID 'linux-x64' (#4841) 2017-09-18 09:31:07 -07:00
bergmeister d804d7fd30 Make the build output the WiX compilation log if it failed. (#4831)
* Make the build output the WiX compilation log if it failed.
Before it was not outputting it not at all because the build output is an array that was piped directly to 'Write-Verbose' instead of converting it to a string using 'Out-String'
Because the WiX log is usually quite verbose (around 250 lines), the log is only shown if there must have been a compilation error due to the missing MSI

* PR 4831: Use -Verbose option on Write-Verbose to force output in build as suggested in review.
2017-09-14 14:12:51 -07:00
Travis Plunk ea7c2bddbe Update travis-ci script so that PRs can fail due to pester tests (#4830)
* Add a switch to force tests to fail for testing CI system to Start-PSPester
* [includeFailingTest] Add commit tag to force tests to fail for testing CI system
2017-09-13 14:14:08 -07:00
Steve Lee 3815a95242 validate the expected output package exists (#4795) 2017-09-11 12:36:24 -07:00
Steve Lee 6f1c7a05c6 Enable cross compiling for raspberry-pi arm32 (#4742) 2017-09-11 12:16:58 -07:00
Steve Lee 7c9b188c13 Rename $IsOSX to $IsMacOS (#4757) 2017-09-07 10:34:40 -07:00
Ilya e588a18c76 Refactor MSBuild project files to get PowerShell version from git tag (#4182)
Extract information about the release tag, number of commits since the tag and the hash of the latest commit within a MSBuild target, and bake that information into version properties of the assemblies appropriately.
2017-09-06 15:20:25 -07:00
Mark Kraus 3b2d169c5e Add test WebListener module and tests for Web Cmdlet Certificate Authentication (#4622)
Introduce new test module 'WebListener.psm1'.
Now web HTTPS tests can use it to exclude using external sites.

PowerShell/PowerShell#4609

* [Feature] Add Tests for Web Cmdlet Certificate Authentication

PowerShell/PowerShell#4609

* [feature] Add new app to Publish-PSTestTools refactor tests

also add ASP.NET to .spelling

* [feature] spelling fix

* [feature] revert badssl changes

* [feature] Impliment suggestions

* [feature] Spelling, var rename, port 8443 to 8083

rebase fix conflict

* [feature] Rename to HttpsListener and Module-ize

.

* [feature] password protect ClientCert to fix macOS import issue

* [feature] Rename to WebListener 

* Rename HttpsListener to WebListener
* Switch Listener from Razor pages to MVC
* Address PR feedback
* Adjust tests

* [feature] Address PR feedback

* [feature] Replace missing smeicolons

* [feature] Address PR Feedback

* [feature] Cleanup and minor fix

* Enum was not used
* GetStatus() was not accessing the correct property chain
* Added -Test param to make URL generation smoother in test code and to fix double / issues

* [feature] More minor fixes

* Https when it matters.
* Expand property... not exclude..
* Remove superfluous and outdated ToString() override

* [Feature] Move ClientCeret.pfx to WebListener Module

* Move the cert
* Adjust Get-WebListenerClientCertificate 
* Remove cert from csproj
* ActionResult -> JsonResult (was mistakenly left as ActionResult during testing)..

* [Feature] Move ServerCert.pfx to Module

* Move cert
* Upate csproj
* Update module
* Add/Update README.md's

CI Retest.
2017-08-31 13:30:35 +04:00
Travis Plunk bd42fe95b4 change the default windows RID to win7-<arch> (#4701) 2017-08-29 17:21:50 -07:00
Travis Plunk 6a68838730 For reliability, start using pester PassThru object to verify tests passed (#4644)
* Add ability to verify a test run using the `-passthru` object from pester
* update travis-ci to use `-passthru` object to verify test results
* Address PR feedback
* call show-pspestererror with a named parameter
2017-08-26 08:26:06 -07:00
Steve Lee 1e0acfac5e removed appending WindowsPowerShell PSModulePath (#4656) 2017-08-25 11:05:23 -07:00
Ilya cdbbb7a4bb Minor formatting commits for Build.psm1 and csproj files (#4630) 2017-08-21 15:23:52 -07:00
Dongbo Wang b3e7fd374f Move to the official .NET Core 2.0 (#4603)
* Migrate to official .NET Core 2.0

* [Feature] Remove chmod code as the issue has been fixed in dotnet
2017-08-16 17:32:46 -07:00
Aditya Patwardhan c699e73ebe Fixed typo (#4600) 2017-08-16 16:07:18 -07:00
Dongbo Wang feeb8e1d25 [Feature] Clean up FullCLR related scripts/docs (#4580) 2017-08-16 12:07:45 -07:00
Travis Plunk 0ca44f147d Package only from the powershell folder at the root directory (#4569) 2017-08-15 16:17:45 -07:00
Dongbo Wang 7762d7bf49 clean up map.json related files and scripts (#4532)
* clean up map.json related files and scripts

* Update .spelling
2017-08-10 13:32:19 -07:00
Mike Richmond 515a999e1c Porting Enable-PSRemoting and its Tests (#2671)
Fixes #1193 for most scenarios. The remaining scenario to be addressed is the Nano Server bring-up scenario. To continue supporting that scenario, I left the Install-PowerShellRemoting script in place.

This change 
1. Ports Enable-PSRemoting and Disable-PSRemoting to PowerShell Core
2. Adds side-by-side PowerShell Core remoting support to the PSSessionConfiguration cmdlets and PSRemoting cmdlets.
3. Ports PSSessionConfiguration tests

This change also introduces a behavioral difference. The PSRemoting and PSSessionConfiguration cmdlets are now context-sensitive and only work for endpoints that match the PowerShell type. For example, Get-PSSessionConfiguration, when running in PowerShell Core, will only return PowerShell Core WinRM endpoints. It will only modify PowerShell Core WinRM endpoints and cannot be used to configure Windows PowerShell endpoints.
2017-08-08 09:36:22 -07:00
Dongbo Wang d2e8d0333d use fpm 1.8.1 (#4468) 2017-08-02 17:09:36 -07:00
Travis Plunk 256ce72ed1 Remove appx packaging related script (#4376) 2017-08-01 17:24:31 -07:00
Travis Plunk e829053e9e Add ability to package all of powershell core as a NuGet Package (#4363)
So that PowerShell can be installed using PackageManagement cmdlets find-package and install-package.
2017-08-01 14:35:50 -07:00
Dongbo Wang b0efc7c2c2 Separate Windows PSRP binary build out of Start-PSBuild (#4335)
There are following major changes:
- `Start-PSBootstrap -BuildWindowsNative` installs the native dependencies required for building PSRP binary. Without `-BuildWindowsNative`, it only installs the dotnet-SDK on Windows platform.
- `Start-PSBuild` doesn't build Windows PSRP binary. Instead, `Start-BuildNativeWindowsBinaries` is added to build it. After the build, 3 files (`'pwrshplugin.dll'`, `'pwrshplugin.pdb'`, `'Install-PowerShellRemoting.ps1'`) will be bin-placed at `src\powershell-win-core` like before.
- The NuGet package `'psrp.windows'` is added to `powershell-core` feed, and we reference it in `powershell-win-core.csproj` to get the Windows PSRP related files. Files (.dll and .pdb) in the package are from the beta.4 release build.
2017-07-25 16:50:27 -07:00
Travis Plunk d24d1634ba Remove unneeded try-catch in build.psm1 (#4328) 2017-07-24 15:26:04 -07:00
Travis Plunk 76e184b0ba move packaging CmdLets to separate module (#4319)
* fix PsScriptAnalyzer issues
* update release docs
2017-07-23 12:29:33 -07:00
bergmeister ffd39b2853 PSScriptAnalyzer fixes by category (#4261)
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select')
- Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison.
- A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison
- Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null'
2017-07-21 21:03:49 -07:00
James Truher [MSFT] 4df979a475 Create symlinks in publish path for RedHat variants (#4198) 2017-07-20 09:42:34 -07:00
Travis Plunk f1ff79011d Due to the use of unsupported APIs, we must remove the LocalAccounts module until a better solution is found. (#4302) 2017-07-19 17:20:35 -07:00
Steve Lee 76413addac Run CI and Feature tests by default with Start-PSPester (#4273) 2017-07-18 14:20:14 -07:00