Commit graph

478 commits

Author SHA1 Message Date
Ilya 84344cbb32 Update PowerShell to build with .NET Core SDK 2.1.300-rc1-008662 (#6718)
* Build Update
- Change `TargetFramework` to `netcoreapp2.1` and removed unnecessary `RuntimeFrameworkVersion` from `PowerShell.Common.props`
- Update dotnet SDK to 2.1.300-rc1-008662
- Update `TypeGen` target in `Build.psm1` to work with 2.1
- Rename macOS runtime to `osx-x64` as the old build logic expects 10.12 and breaks running on 10.13 system.
- Remove `PackageReference` to `System.Memory` as it's part of dotnetcore 2.1
- Update search for `crossgen` executable to find the matching version

* Test Update
- Update test tools `WebListener` to latest `asp.net core`
- Marked `AuthHeader Redirect` tests as `Pending` due to change in CoreFX
2018-05-02 16:58:39 -07:00
Bryan Harmat 03b1f2bb99 tools: fix comparison to see if sudo test is needed in install-*.sh (#6771)
The comparison to test if we were using sudo was failing when running as root. We would then run -v, and get a bad error message. fixing the comparison.
2018-05-01 10:35:19 -07:00
Dongbo Wang 1f9e9d243d Update 'Get-ChangeLog' to make it more accurate (#6764)
Update 'Get-ChangeLog' to make it more accurate

Use "||" as the delimiter instead of "|", so it works for commit message that has the pipeline operator in it.
Handle merges that create a merge node in history.
Do not treat powershell team members as external contributors.
2018-04-30 13:00:28 -07:00
Aditya Patwardhan 64050a4687 Added Publish-NugetToMyGet to exported functions in psd1 (#6763)
Added the missing export for Publish-NugetToMyGet.
2018-04-27 16:26:13 -07:00
Dongbo Wang 95aa40ee64 Expose 'Expand-PSSignedBuild' from packaging module 2018-04-25 11:51:50 -07:00
Travis Plunk 438b0e545f
Add meta properties to mac VSTS yml (#6619)
Add meta properties to mac VSTS YAML
- Add a property to clean the build machine
- Add a property to set the format of the build name
- add a property to set which queue to run the build in
2018-04-13 15:04:22 -07:00
Steve Lee f760fde0b7 Remove support for file to opt-out of telemetry, only support env var (#6601)
Since a PR added support to opt out of telemetry via an environment variable, we can remove the,
always intended to be a temporary, solution of deleting a file to opt out of telemetry since the
environment variable can be defined at the system level and exist before even installing PowerShell Core.

Because the variable is defined as opt out, a value of true, yes, or 1 means no telemetry is sent.
2018-04-13 10:29:39 -07:00
Travis Plunk adce514a0c
fix error about setting readonly variable (#6617) 2018-04-11 11:01:38 -07:00
Travis Plunk aefc0d89b0
make gem use sudo for macOS (#6610)
gem install requires sudo on official macOS build VMs.
- make bootstrap use sudo for macOS
2018-04-10 12:18:11 -07:00
Darwin 46fa2260a8 Update installpsh-<distrofamily>.sh Installers to Handle "preview" in version number (#6573) 2018-04-06 15:23:11 -07:00
Travis Plunk 77f36498e6
Simplify the paths the MSI uses (#6442)
- Implementation of PowerShell/PowerShell-RFC#115 (If anything changes in the RFC, we will treat it as a bug, and fix it later)
- Update registry and directory paths to use 6 for the version for stable and 6-preview for a preview release
- Add checkbox to set path
- default checkbox to off for preview builds and on for stable builds
2018-04-02 10:47:29 -07:00
Travis Plunk 701b919345
MSI: add function to generate a MSP (#6445)
add a function to generate an MSP
2018-03-26 14:39:48 -07:00
Aditya Patwardhan 9bc81ad695
Update docs for v6.1.0-preview.1 release (#6481)
* Update docs

* Added the missing 'stable' label
2018-03-23 16:48:24 -07:00
Travis Plunk e5046baf9d Restore for official Linux arm builds (#6455) 2018-03-21 15:15:18 -07:00
Travis Plunk 1730d8c496
MSI: update path with proper value (#6441)
MSI: update path with proper value
- Add verification that path is updated
2018-03-21 12:23:24 -07:00
kasper3 271dd50df2 Add Alpine Linux support (#6367)
sys/sysctl header is not available in musl-libc based systems and system calls are available without any header inclusion. I have ported the cmake test from CoreFX repo (https://github.com/dotnet/corefx/blob/431475b8/src/Native/Unix/configure.cmake#L560).

Progress towards: #4605
2018-03-20 13:34:18 -07:00
Travis Plunk 5e1bb01cb3
migrate the mac offical binary build to VSTS mac hosted preview (#6363)
create a PowerShellPackage...ps1 that works with these VMs (vs our custom VM)
create a script to create the \powershell folder with correct permissions
a YML VSTS build definition
2018-03-19 15:56:43 -07:00
Dongbo Wang b49fb7f1b3
Update 'macos.md' and 'windows.md' with the version number '6.0.2' (#6416) 2018-03-19 11:38:27 -07:00
Travis Plunk fcd6ddcfc7
Update version numbers to 6.0.2 (#6402)
* Add script to update the version number
* Update version to 6.0.2
2018-03-15 11:41:01 -07:00
Aditya Patwardhan 71cb49a99d Build: Remov version forcing code from NuGet package generation (#6390) 2018-03-15 10:12:56 -07:00
Travis Plunk 8ffc0b0e3c
Support non-GitHub commits in the change log generation script (#6389) 2018-03-13 17:13:56 -07:00
Travis Plunk 8ba6f319f3
MSI: update architecture specific filenames (#6379) 2018-03-13 14:02:12 -07:00
Travis Plunk 88b3833ee3
Add no appimage build (#6380) 2018-03-13 13:49:25 -07:00
Travis Plunk 491ee47ee7
When doing daily/test build in a non-release branch use the branch name as the preview name (#6355) 2018-03-12 12:31:34 -07:00
Travis Plunk 25ecf8c83c Clean the intermediate artifact 'psoptions.json' from build (#6356) 2018-03-10 09:51:23 -08:00
Donovan Brown 489f8336b1 Added Service Point Manager call to force Tls12. (#6310)
Calls [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 during bootstrap to download PowerShell core to avoid an error.
2018-03-09 15:12:05 -08:00
Dongbo Wang d623c9f10c Add '-Restore' when build win-arm and win-arm64 (#6353) 2018-03-09 09:50:26 -08:00
Travis Plunk 2d58072460 Make sure package verification failure fails the AppVeyor build (#6337) 2018-03-08 15:58:59 -08:00
Dongbo Wang 6d191970c5
Build: Remove two unneeded lines from 'Invoke-AppveyorFinish' (#6344) 2018-03-08 14:51:10 -08:00
Dan Travison 0c845b94c7 Rename log and logerror to Write-Log [$message] [-error] (#6333)
Fix #6332
This change renames log and logerror functions to a single Write-Log [$message] [-error] function to avoid conflicting with the log command on MacOS.
2018-03-08 10:47:20 -08:00
Travis Plunk f1c0c2ade5
Clean build during daily build to ensure MSI package is generate correctly (#6334)
Clean build during the daily build to ensure MSI package is generated correctly
- Do another clean build directly before packaging to clean up files that test has added
2018-03-07 19:47:21 -08:00
Travis Plunk 8f4eaf3bbe
make Linux packages use correct version scheme for preview releases (#6318)
Fixes #6315

make Linux packages use correct version scheme for preview releases
- Now uses <Major>.<Minor>.<Patch>~<PreviewName> instead of <Major>.<Minor>.<Patch>-<PreviewName> as the - was interpretted as an iteration of the release not a preview.
2018-03-07 11:45:21 -08:00
Timothée Mazzucotelli d56c1913aa Add support for Debian in installpsh-debian.sh (#6314)
The script installpsh-debian only works for Ubuntu distributions. This PR adds support for Debian as well.

Related issue:  #5700

* Remove support for Ubuntu 17.04 in installpsh-debian.sh
2018-03-06 14:01:50 -08:00
Travis Plunk da905f891b
MSI: Make sure that file components are patchable (#6303)
MSI: Make sure that file components are patchable
- avoid changing names and guids of components between builds as this prevents patch generation
- This required submitting the file generated by heat
- add code to make sure the generated file is not out of date
2018-03-06 10:13:26 -08:00
Travis Plunk 7c7ec241a0
MSI: Cause preview builds to install Side by side with release builds (#6301)
MSI: Cause preview builds to install Side by side with release builds
- change the upgrade code if there is a preview part of the version
2018-03-05 10:27:47 -08:00
Travis Plunk 5030c9a2fd
change the artifact count for wixpdb (#6254) 2018-02-26 18:10:55 -08:00
Travis Plunk 49ec403899
fix MSI creation errors, and capture wixpdb for later patch creation (#6221)
- add `wixpdb` output when creating `MSI` package
- capture `wixpdb` in official build
- clean up anything left behind from previous MSI builds before starting MSI build to prevent using dirty files.
- make sure MSI creation fails if there is an error
- ignore `.wixpdb` files in git
- Add functionality to `Start-NativeExecution` to 
    - only display output if there is an error 
    - log caller information
- WXS validation error fixes
    - Remove unused `ExitDialog` to fix ICE82
    - Add KeyPath to `SetPath` to fix ICE18
    - Use `HKMU` which translates to `HKLM` to runtime to fix various validation errors about creating the shortcut
- Suppress Validation errors
    - suppress ICE61, which is about same version upgrades being allowed
    - suppress ICE57, caused by the shortcut not being installed per user
2018-02-26 15:45:15 -08:00
Aditya Patwardhan a53547ce78 Add scripts to generate unified Nuget package (#6167)
Remove the functions which generated Nuget packages for Windows.
Add function New-UnifiedNugetPackage to generate nuget packages for each assembly with unix and windows runtimes.
Add function New-NuSpec and New-ReferenceAssembly for creating the required items forNew-UnifiedNugetPackage.
Add a sample for cross platform project with conditional compilation for Linux.
Add function Publish-NugetToMyGet to publish nuget packages to powershell.myget.or
2018-02-26 15:35:09 -08:00
Travis Plunk ff89b8ade7 Fix date tests failing in travis CI full builds (#6249) 2018-02-26 15:11:18 -08:00
Travis Plunk 7b2dff8a3c
use powershell windowsservercore docker image for release builds (#6226) 2018-02-23 15:26:57 -08:00
Travis Plunk 9a46b3f3c0
Refactor new-msipackage into packaging.psm1 (#6208)
Refactor new-msipackage and related function into packaging.psm1
2018-02-22 13:31:00 -08:00
Klaudia Algiz 17b501c9fa Support running tests in root privilege on Linux. (#6145)
Support running tests in root privilege on Linux by adding the `REQUIRESUDOONUNIX` tag.
- Delete skip tag in tests which require `sudo`.
2018-02-16 11:13:23 -08:00
Steve Lee c1c5344a88 Update copyright and license headers (#6134)
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: #6140

Manually reviewed each change.

Fix #6073
2018-02-13 09:23:53 -08:00
Travis Plunk 363c964ebd
add scripts to set/update the release tag in VSTS (#6107) 2018-02-07 15:24:34 -08:00
Christoph Bergmeister 88909811ff Msi installer: Add smoke test (#6105)
PR 6043 broke the installer (issue #6095). To prevent this from happening in the future, add a smoke test that installs the msi in appveyor build and make build fail if installation failed.
It uses the exit code to determine the success. The reason why it does not fail in the current state is because as I pointed out here, the failing custom action is not returning its exit code.
2018-02-07 15:00:42 -08:00
Travis Plunk 3a33be87a7 Merge branch '6.0.1' into master
# Conflicts:
#	docker/release/fedora27/Dockerfile
#	docs/installation/linux.md
#	docs/installation/macos.md
#	tools/metadata.json
2018-01-25 16:35:25 -08:00
Dongbo Wang 45bf1dc142
CI Build: Use TRAVIS_PULL_REQUEST_SHA to accurately get the commit message (#6024) 2018-01-25 13:42:49 -08:00
Thomas Conté 7dcd4c83d9 Fix build/package/installation scripts for SLES (#5918)
Small changes to the SUSE installation script so that it allows installing on SLES 12+ in addition to openSUSE 42+
2018-01-22 14:58:17 -08:00
Travis Plunk a603cf3867
Update csproj files to the latest version of the package references (#5961)
* Add function which tells you packages which probably need to be updated
2018-01-22 12:06:50 -08:00
Dan Travison 65a4002990 Logging: Fix the escaped characters when generating '.resx' file from PowerShell ETW manifest. (#5892) 2018-01-19 08:55:20 -08:00
Dongbo Wang 4b09a93676
Update docs and scripts for PowerShell 6.0.1 release (#5938) 2018-01-18 15:07:43 -08:00
Christoph Bergmeister d3a775da9a Packaging: simplify building an installable package for Windows (#5871)
This is the continuation of PR 5499 that had to be abandoned due to a fatal merge conflict and I did not want to risk accidentally reverting recent fixes.

    Remove unnecessary/unused default for productGuid because it always gets a new Guid when being called from Start-PSPackage
    Add defaults for required files but also add extra path validation attribute
    Rename ProductGuid to ProductCode
2018-01-17 15:34:03 -08:00
Travis Plunk a08f3241a3 Merge 6.0.0 into master
# Conflicts:
#	.github/Images/GitHub-PR.png
#	assets/Product.wxs
#	docs/installation/linux.md
#	docs/installation/macos.md
#	docs/installation/windows.md
#	test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1
#	tools/metadata.json
2018-01-10 17:42:41 -08:00
Dongbo Wang c4cf1440dd
Update docs and scripts for PowerShell 6.0.0 GA release (#5837) 2018-01-09 15:57:38 -08:00
Dongbo Wang 658960e3f9 Move group policy settings and enable policy controlled logging in PowerShell Core (#5791)
Make PowerShell Core reads group policy settings from different registry keys (Windows only) and the configuration files (both Windows and Unix).
- On Windows, move to different GPO registry keys.
- On both Windows and Unix, read GPO related settings from the configuration file `powershell.config.json`.
- On Windows, the policy settings in registry take precedence over the configuration file.
- Enable policy controlled logging and transcription on Unix.
2018-01-08 18:09:00 -08:00
Dongbo Wang d261e1f166
Move group policy settings and enable policy controlled logging in PowerShell Core (#5791)
Make PowerShell Core reads group policy settings from different registry keys (Windows only) and the configuration files (both Windows and Unix).
- On Windows, move to different GPO registry keys.
- On both Windows and Unix, read GPO related settings from the configuration file `powershell.config.json`.
- On Windows, the policy settings in registry take precedence over the configuration file.
- Enable policy controlled logging and transcription on Unix.
2018-01-08 12:03:23 -08:00
Dongbo Wang 117e83a025 Add xUnit tests for reading Policy settings from config file 2018-01-04 13:40:51 -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 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
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
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
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
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
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
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 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
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 24298f76f5
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-08 10:55:34 -08:00
Travis Plunk dcbb3a5299 Packaging: Try to make New-Unix package more readable (#5625)
* refactor start-pspackage into functions

* [Package] Added instrumentation

* [Package] update change log

* [Package] Fix distribution parameter in get-dependecies

* [Package] fix dependencies

* [Package] fix issues with validate script
2017-12-07 17:57:08 -08:00
Travis Plunk c04db0f79a
update signing subjects (#5650)
fixes #5642
Update the signing subject for the windows package and windows files
2017-12-07 17:56:37 -08:00
Travis Plunk c367a9def1 Packaging: Try to make New-Unix package more readable (#5625)
* refactor start-pspackage into functions

* [Package] Added instrumentation

* [Package] update change log

* [Package] Fix distribution parameter in get-dependecies

* [Package] fix dependencies

* [Package] fix issues with validate script
2017-12-07 10:48:00 -08:00
Dongbo Wang 237ac0b740 Minor refactoring of the release build scripts (#5632)
* Update release build

* Minor refactoring of the build script
2017-12-07 10:28:16 -08:00
Travis Plunk c44ddfd6fe build: unbundle pester (#5623)
# Conflicts:
#	tools/appveyor.psm1
#	tools/travis.ps1
2017-12-06 16:13:26 -08:00
Dongbo Wang 233f35f68b Minor refactoring of the release build scripts (#5632)
* Update release build

* Minor refactoring of the build script
2017-12-06 15:51:33 -08:00
Travis Plunk 25617f15c2 build: unbundle pester (#5623)
* remove pester module

* restore Pester as a module only in CI build from the git repo

* mark appveyor builds as CI builds

* remove pester exclusions

* mark travis builds as ci

* exclude publish folder from spell check

* do not run spell check on publish folder
2017-12-04 17:16:53 -08:00
Travis Plunk 0dfc1f4257 Remove exclusion for hang and add context exception for remaining instances (#5595) 2017-12-01 17:34:30 -08:00
Chunqing Chen 22abe98c05 Fix xunnit test for PS (#4780)
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
2017-12-01 17:34:30 -08:00
Travis Plunk baa0a28a21 Remove exclusion for hang and add context exception for remaining instances (#5595) 2017-12-01 09:47:18 -08:00
Chunqing Chen 52df947080 Fix xunnit test for PS (#4780)
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
2017-11-30 14:44:41 -08:00
Travis Plunk 8ec31afe80 Update docker file for windows build (#5459)
reducing the base image size should make the build a little faster
Also, remove the duplicate upload of a file
2017-11-28 17:53:57 -08:00
Steve Lee aae076e046 remove signed folder in zip during packaging (#5527) 2017-11-28 17:53:57 -08:00
bergmeister ee8b039ed1 Disambiguate icon for daily builds on Windows (#5467)
* Disambiguate icon for daily builds on Windows.
Some code had to be borrowed from build.psm1 because this script has to be self contained in case it gets executed by only downloading this file via the published download link https://twitter.com/Steve_MSFT/status/930585082451992576
2017-11-28 17:53:57 -08:00
Travis Plunk 9bedef0c62
Update docker file for windows build (#5459)
reducing the base image size should make the build a little faster
Also, remove the duplicate upload of a file
2017-11-28 15:36:25 -08:00
Steve Lee db0498da6b remove signed folder in zip during packaging (#5527) 2017-11-27 17:26:51 -08:00
bergmeister 71e588d223 Disambiguate icon for daily builds on Windows (#5467)
* Disambiguate icon for daily builds on Windows.
Some code had to be borrowed from build.psm1 because this script has to be self contained in case it gets executed by only downloading this file via the published download link https://twitter.com/Steve_MSFT/status/930585082451992576
2017-11-22 14:14:32 +04:00
bergmeister cc942a222b Change synopsis of install-powershell.ps1 to reflect that it works cross-platform (#5465) 2017-11-21 15:57:34 -08:00
Travis Plunk e1a57e5194
Update target tag for master CI to 6.1.0-preview.1 (#5513)
* use metadata JSON to create release tag in CI
2017-11-21 13:51:10 -08:00
Travis Plunk cc24b88a1e Fix mac packaging (#5496) 2017-11-20 16:00:22 -08:00
bergmeister 5702081ae6 Change synopsis of install-powershell.ps1 to reflect that it works cross-platform (#5465) 2017-11-20 12:28:17 -08:00
Travis Plunk 2a5d4c43d3 Fix mac packaging (#5496) 2017-11-17 17:26:00 -08:00
Travis Plunk e2c7e02099 Fix semantic version parsing (#5480) 2017-11-16 10:17:31 -08:00
Travis Plunk 35a46a75bc
add mac release build scripts (#5474) 2017-11-15 17:10:19 -08:00
Dongbo Wang 97511a9e2a
Fix the regex for '-ReleaseTag' (#5473) 2017-11-15 16:55:13 -08:00
Dongbo Wang 5f72faab54
Change to query for metadata from our file (#5468) 2017-11-15 13:54:30 -08:00
Travis Plunk 4007470403
Package signing (#5463)
* add template xml for package signing

* Add script to generate package signing XML

* remove uploading artifact, it always fails.

* Allow the XML to be updated to be specified
2017-11-15 13:03:32 -08:00
Darwin 0f41c185d7 Add support for installing powershell on Amazon Linux (#5461)
- Support for Amazon Linux
- Ensure both tarball installs will reinstall/upgrade
- Clean up comments with incorrect urls
2017-11-15 09:51:52 -08:00
Steve Lee 83e1d64669 Enable install-powershell.ps1 to update the current running powershell (#5429)
1. Remove `[validate]` attribute from parameter so this script can be invoked directly from the web. This doesn't have any negative impact as the $Destination parameter will have a default value if null or empty.
2. Move removal of destination folder later as installing the package requires package management module and archive module (on Windows)
3. On Windows, because files have open handles when run from existing powershell-daily install, I rename the existing files and copy over the new ones.  User needs to exit and restart `pwsh` to take effect (similar to macOS/Linux where you have to exit and restart anyways)
2017-11-14 10:45:08 -08:00
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
Dongbo Wang da0b384b2a Try fixing the 'brew update' issue in bootstrap script (#5400)
* Try fixing the 'brew update' issue in bootstrap script

* Add a log message

* Add a comment
2017-11-13 12:21:53 -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
Dongbo Wang 2f399e233c
Enhance 'install-powershell.ps1' to work on Linux/MacOS (#5411)
Enhance 'install-powershell.ps1' to work on Linux and macOS too. A user can install release version or daily powershell core on Linux and macOS.
When `-AddToPath` is specified:
- On Windows, add the absolute destination path to the 'User' scope environment variable 'Path';
- On Linux, make the symlink '/usr/bin/pwsh' points to "$Destination/pwsh";
- On MacOS, make the symlink '/usr/local/bin/pwsh' points to "$Destination/pwsh".
2017-11-10 17:54:24 -08:00
Steve Lee 54f34a0bac Support '[package]' tag in PR CI and fix nightly build on macOS (#5410)
- Support '[package]' tag in PR CI to validate packaging changes in PR CI runs.
  When using '[package]' tag, regular CI tests will run and packaging steps will also run.
- Fix nightly build on macOS.
2017-11-10 17:28:55 -08:00
Travis Plunk b1d312317c
make name a dynamic parameter (#5415) 2017-11-10 15:28:38 -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
Dongbo Wang 55f6827aa9
Revive 'download.sh' and make it redirect to 'install-powershell.sh' (#5386) 2017-11-09 22:58:53 -08:00
Travis Plunk 1a5134f9e4
Add signing manifest and script to update it with production values (#5397)
* Add signing configuration file
* add updatesigning.ps1
2017-11-09 17:47:03 -08:00
Steve Lee 8b42e1748e Add ability to produce tar.gz pkg for Raspbian (#5387) 2017-11-09 10:48:55 -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
Travis Plunk ab24ac2b8a Use simplified names for compliance folders (#5388) 2017-11-09 07:29:02 -08:00
Travis Plunk 610c70d952 set expected binaries and variable name for folder for symbols build (#5357) 2017-11-07 12:09:34 -08:00
Greg Zimmerman a674c518b1 Enable macOS launcher (#5291) 2017-11-06 10:44:20 -08:00
Dan Travison 2670917981 Redirect ETW logging to Syslog on Linux (#5144)
This PR is divided into the following areas:
1. Add/Rename the PowerShell/Windows ETW manifest to the repo and change both the provider id (guid) and name. See #4939.
The manifest is at tools/resxgen/PowerShell-Core-Instrumentation.man

2. Generate a resx file containing the string resources needed for logging ETW events to syslog.
This is accomplished by tools\resxgen\resxgen.psm1 and resxgen.ps1. The tool generates two files

A resx file containing string resources for each message string from the manifest. This is generated in the System.Management.Automation\gen directory.
A C# class (EventResource) that provides the mapping between the integer event id and the associated string resource name. The file is generated in the System.Management.Automation\CoreCLR directory with a compile-time condition of UNIX
NOTE: The EventResource.cs class generated by resgen is explicitly ignored in the csproj file; it is not used.

3. SMA\utils\tracing\PSSysLogProvider.cs
Implements the abstract LogProvider class and is the syslog equivalent of PSEtwLogProvider. The class contains a number of logical methods for logging lifecycle, health, and normal events.

4. SMA\utils\tracing\SysLogProvider.cs
This is the Syslog equivalent of ETW's log provider class and implements a Log method versus ETW's EventWrite. It is also responsible for resolving event ids to resource names and performing the Syslog call. There is a large comment block in the class XML doc that describes the types of log output it produces.

5. SMA\utils\tracing\PSEtwLog.cs
PowerShell's current implementation is tightly coupled to this class; with code calling it directly for all events. To simplify integration of syslog, I updated the class to create an instance of PSSysLogProvider on Linux and removed the Linux-specific stub file.

6. SMA\engine\PropertyAccessor.cs
This class provides a wrapper around PowerShellProperties.json and has been extended to have Unix-specific assessors for configuring logging. Note that the file is expected to be in the $PSHOME directory to ensure SxS.

Currently, there are four configuration properties:

- LogIdentity - the string identifier for the source application. This defaults to 'powershell' and can be configured to enable distinguishing between side-by-side installations.
- LogLevel - configures the tracing level (log level). Informational is the defauilt.
- LogChannels - used to enable operational and analytic logging. Operational is the default.
- LogKeywords - used to configure enabling tracing by keyword. All keywords other than `UseAlwaysAnalytic` are enabled by default.

NOTE: This will likely change. PowerShell sometimes confuses the analytic channel with this keyword and sends logging to the wrong channel. Once this is cleared up, `UseAlwaysAnalytic` and `UseAlwaysOperational` keywords will likely be removed.

Additional Notes:

1. The current implementation writes directly to syslog and writing to a separate log file is still pending.
2. The generated class and resx are not part of the build; instead, it is expected that Resxgen should be run when events are added to the manifest. To fully automate the process, resxgen will need to be updated to generate the other dependent enums such as 'PSChannel', 'PSEventId', 'PSTask', 'PSOpcode', etc. You will see parsing logic in resxgen.psm1 to prepare for that but it is not enabled at this point.
4. Documentation is pending that documents the format of the syslog output as well as associated configuration.
5. As mentioned at the start, tests are pending
2017-11-06 08:32:29 -08:00
Steve Lee 0557f2df72 add Uniform Type Identifier conforming with Apple standards using a reverse dns style prefix (#5323) 2017-11-04 17:02:50 -07:00
Travis Plunk cbe6b88df2
Include symbols folder an embedded zip when packaging symbols (#5333) 2017-11-03 14:49:15 -07:00
Dongbo Wang da5a1a6015
Update 'installpsh-suse.sh' and remove 'download.sh' (#5309)
- Update `installpsh-suse.sh` to work with the .tar.gz binary archive.
- Remove `download.sh` as it's not used anywhere now. (checked with PowerShellGet and OneGet, they are using a local copy of download.sh).
2017-11-03 08:47:26 -07:00
Dongbo Wang 3771c88da3
Always run test with crossgen'ed assemblies in CI (#5315) 2017-11-02 18:03:34 -07:00
Travis Plunk 74ebde9d3c
Release build fixes (#5317)
small fixes found while doing current work item

-replace expects a regex when I wanted to do a literal replace.
Have Sync-PSTags fix any issues it find
2017-11-02 16:05:56 -07:00
Travis Plunk 98244a89f9
remove sync-tags for Linux. It is failing. (#5299) 2017-11-02 15:00:18 -07:00
Travis Plunk 8fcdc01827
Refactor for signing (#5300) 2017-11-02 13:52:17 -07:00
Travis Plunk 9c75cea9ff
use context rules instead of file or file and context rules because path to file can vary. (#5297) 2017-11-01 14:35:58 -07:00
Aditya Patwardhan a8008f8cbb Revert "Add macos launcher. (#5138)" (#5259) 2017-10-30 15:38:14 -07:00
Travis Plunk 8702dea03b Sync tags in release build so that shallow cloning can be enabled. (#5248) 2017-10-30 10:06:47 -07:00
Travis Plunk ce03a6c2be
Make sure web hook gets called (#5249)
if something goes wrong during the build, we might exit and not update the badge or fire the webhook.

Enable the after_success and after_failure stages of the travis-ci build so we can have a better chance of getting these done.
2017-10-27 11:35:40 -07:00
Steve Lee 4bc52d2358 Use consistent '(c)' for copyright symbol (#5210)
- Remove the year about copyright
- Fix casing of `All rights reserved`
- Replace Unicode characters representing single quote with a single quote
2017-10-26 14:12:19 -07:00
Travis Plunk 00dde3d8f2 Add term rules (#5213)
* Add Terms Rules

* remove offensive term

* Add code owner for compliance files
2017-10-25 15:08:52 -07:00
Dongbo Wang bfce69ed83 Update install/build scripts and dockerfiles (#5222) 2017-10-25 08:25:35 -07:00
Aditya Patwardhan d0806811e4 Update docs and scripts for beta.9 (#5217) 2017-10-24 16:28:22 -07:00
Dongbo Wang e4d88aaa9d Fix appimage package name to be lower case 'powershell-..' (#5206) 2017-10-23 21:40:39 -07:00
Travis Plunk 8051977ef5 Log sending daily web hook. (#5203)
Make sure we count xunit tests failures as a CI failure.
2017-10-23 13:58:03 -07:00
Travis Plunk 14af252878 Update packaging to only package PowerShell binaries when packaging symbols (#5145)
* Update packaging script to only package PowerShell binaries when creating symbols zip.  disallow all other package types for symbols

* remove instrumentation used for debugging during development

* Add error action silently continue to cleanup for reliability.

* Add comment about why folder is being deleted.
2017-10-23 12:30:25 -07:00
Travis Plunk 13eb283560 Add code to send WebHook for Travis-CI Daily Build (#5183) 2017-10-20 15:06:37 -07:00
Greg Zimmerman 5913069e58 Update powershell to pwsh. (#5174) 2017-10-19 15:09:57 -07:00
Dongbo Wang 2fd484f491 Update the man help file used in packaging (#5173)
* Update pacakging.psm1 and rename man file

* Update pwsh.1.ronn
2017-10-19 15:09:16 -07:00
Dongbo Wang 59b5d16139 Update appimage.sh to reflect the new name 'pwsh' (#5172) 2017-10-19 12:32:55 -07:00
Greg Zimmerman 01fe7c24eb Add macos launcher. (#5138) 2017-10-18 12:22:07 -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
Travis Plunk dc1a1cee33 Add release builds that produce symbols for compliance scans (#5086) 2017-10-12 14:48:53 -07:00
Dongbo Wang a391998a25 Support creating tarball package for Linux and macOS (#5085)
* Support creating tarball package for Linux and macOS

* Address comments
2017-10-12 13:36:46 -07:00
Steve Lee 9d5823baeb Fix some output strings (#5065)
Commented out check for sudo as it was failing on Travis-CI
Updated version of Ruby to 2.3.3
Reorder install so Ruby gets installed before installing PS as Homebrew relies on Ruby 2.3
Remove sudo check which breaks Travis-CI
2017-10-09 13:23:29 -07:00
Dongbo Wang 42b8f02858 Update docs for beta.8 release (#5024) 2017-10-05 15:46:07 -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
Steve Lee 2639cd89ce Autocorrected CRLF to LF (#4943)
Also, fix `Parser.Tests.ps1` after correcting CRLF.
2017-09-29 16:28:15 -07:00
Travis Plunk f02e692a5d Fix credential scan issues (#4927)
* Add file secret suppression
* Add line secret suppression
* This will be consumed in the VSTS daily build.
* Renamed tests with ConvertTo-SecureString to avoid false positives
2017-09-27 11:54:22 -07:00
Travis Plunk 414d56170b Move release build definition into PowerShell (#4884)
* Add docker related files from PSRelease
base release docker builds on PowerShell release docker images

* ignore the PSRelease folder

* Add vstsbuild.sh wrapper of vstsbuild.ps1

* add vstsbuild.ps1

* Add build.json

* address PR feedbock
2017-09-26 14:02:55 -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 6703014b32 Merge beta.7 release branch to master 2017-09-13 17:24:02 -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
Dongbo Wang a86e608c8b Update docs for beta.7 release 2017-09-12 15:08:49 -07:00
Travis Plunk fb60c47a1e Fix travis-ci script so that PRs can fail due to pester tests (#4807) 2017-09-11 15:24:09 -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
James Truher [MSFT] cfb2913a29 Modify travis build to upload a daily build based on platform (#4689)
change README.md to view a platform specific badge
2017-09-05 11:11:47 -07:00
Travis Plunk bd42fe95b4 change the default windows RID to win7-<arch> (#4701) 2017-08-29 17:21:50 -07:00
Aditya Patwardhan fd047a8250 Creates a single package for Windows (#4540)
The updates to build.psm1 and packaging.psm1 create a single package (per bitness), which works on all the Windows OS versions, namely Windows 7 / Windows Server 2008 R2, Windows 8.1 / Windows Server 2012 R2, Windows 10 / Windows Server 2016.
2017-08-28 16:10:03 -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
Dongbo Wang 80e02bda60 Update docs and scripts for beta.6 release (#4660) 2017-08-24 12:43:31 -07:00
Darwin ece7b44de3 Update install scripts with minor fixes targeting macOS
Fixes #4617
Fixes #4511
Change VS code install to use cask
Change OSX to use curl
Update version number by point release.
2017-08-22 12:10:00 -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
Travis Plunk b3ebdafccd Only push to NuGet for Full Build (cron) (#4517) 2017-08-11 08:50:04 -07:00
Travis Plunk 8bf386e25e Add ability to package non-release packages (#4509) 2017-08-09 14:36:23 -07:00
Dongbo Wang 5d53bd373a Fix the hang issue in Travis CI build triggered by the [Feature] tag (#4536)
* Fix the hang issue in Travis CI build triggered by the [Feature] tag

* [Feature] Update badge only in daily build

* [Feature] Use the term 'daily build'
2017-08-09 14:01:52 -07:00
Travis Plunk df379f29c7 Update brew before installing powershell in installpsh-osx.sh (#4506) 2017-08-08 09:22:02 -07:00
James Truher [MSFT] 0e4cd634b8 Remove last-modified from headers as it causes a failure when updating the daily badge (#4522) 2017-08-08 09:09:11 -07:00
Dongbo Wang 7c72bea590 Update docs/scripts for beta.5 release (#4470) 2017-08-03 10:43:57 -07:00
Travis Plunk d36776aafc Add -Force parameter to new-zippackage (#4465) 2017-08-02 15:14:47 -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
Darwin b7b3b69a74 add amazonlinux compatibility in install-powershell.sh (#4360)
* Updated to support amazon linux (centos variant)

* Updated to support amazon linux (centos variant)

* Updated to support amazon linux (centos variant)
2017-08-01 09:47:01 -07:00
Travis Plunk 1c42ed253a Move packaging strings to .psd1 file (#4333)
Move here strings in packaging module to psd1 file for easier maintenance of strings and code.
2017-07-26 08:49:56 -07:00
Travis Plunk f3dd2f0414 Merge pull request #3608 from DarwinJS/feature/install-powershell.sh
create script to install latest powershell from repositories
2017-07-25 18:48:20 -07:00
Travis Plunk e4dc938732 Get macOS working and fix misc issue 2017-07-25 17:55:42 -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
Travis Plunk 0f34324570 Fix PRs not running Feature (#4304) 2017-07-22 15:34:03 -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
DarwinJS fdabe86880 trying apostrophes
rename md to have only one period
fix md spelling mistakes
Fixes to markdown to follow strict syntax
create readme
2017-07-21 10:59:16 -07:00
DarwinJS c31f274767 install-powershell.sh
updating for pull request comments
OSX Install script updated to use repositories

Using TR, use curl rather than wget since we ensured it is on the system
Update comments in install-powershell.sh
install-powershell.sh
2017-07-21 10:59:16 -07:00
Travis Plunk 3b3b3d1b70 Fix build message getting truncated on rerun (#4297) 2017-07-19 16:47:11 -07:00
Travis Plunk 9571f8f2f4 Add ability to run feature tests for pr (#4277) 2017-07-19 10:33:58 -07:00
Travis Plunk 73b3b0895c Use cached 'dotnet' in AppVeyor (#4278) 2017-07-18 11:39:04 -07:00
Travis Plunk 67266f6aa0 Move Bootstrap to 'install' phase for Travis-CI (#4250) 2017-07-13 21:21:32 -07:00
Travis Plunk a10d1c2281 Merge beta.4 release changes (#4247)
* Fix the path on windows containers (#4241)

* Updated string to reflect beta.4 version (#4238)

* Add beta.4 changelog (#4245)

* first pass at beta.4 changelog

* grammar and spelling fixes (#1)

* sort and add new words to dictionary (#4248)
2017-07-13 17:30:58 -07:00
Travis Plunk 6b252868d4 Make travis ci quieter (#4229) 2017-07-11 22:07:31 -07:00
Dongbo Wang 05dffcd1aa Update release version 2017-06-20 14:14:38 -07:00
Dongbo Wang a543161d42 Update docs for beta.2 release (#3922) 2017-06-02 14:17:27 -07:00
James Truher [MSFT] 599eae9b1b Do not send telemetry in CI (#3785)
This removes the telemetry semaphore file in CI for both Travis-CI and AppVeyor
2017-05-17 11:08:38 -07:00
Dongbo Wang ee779b58e0 Update docs for beta.1 release (#3748)
* First iteration

* Second iteration

* Third iteration

* Fourth iteration

* Fifth iteration

* Revert the temporary workaround

* beta.1 release only support Mac OSX 10.12+
2017-05-10 09:49:02 -07:00
Dongbo Wang 79a1f80309 Update build script to always use 'dotnet publish' (#3589)
Also update 2 building docs
2017-04-18 13:12:35 -07:00
probonopd 3516872144 Use /bin/bash, fixes #3525 2017-04-12 08:57:26 -07:00
Dongbo Wang b5c1473484 Alpha.18 release doc updates (#3492) 2017-04-06 21:27:48 -07:00
Travis Plunk 459b0b5f29 OpenSUSE42.1 docs update and download.sh (#3478) 2017-04-04 17:41:40 -07:00
Steve Lee 4d0e21f6d2 Add "cache-control:no-cache" and "last-modifed" to headers to prevent GitHub CDN from caching Travis nightly badge (#3449) 2017-03-28 22:15:52 -07:00
Dongbo Wang 54fa658e31 Migrate from project.json to MSBuild (#3398)
- FullCLR build is disabled in this change.
- FullCLR build related functionalities in `build.psm1` and `AppVeyor.psm1` are disabled. They are not cleaned up from `build.psm1` and `AppVeyor.psm1` yet. We need to adopt .NET Core 2.0 to verify the portable module concept, and if that works well, we will remove the Windows PowerShell source code and clean up our scripts.
- `dnxcore50` and `portable-net5+win8` target framework monikers are removed.
- Dependency on `Microsoft.NETCore.Portable.Compatibility` is removed. It's not necessary, but it may come back when we work on supporting the `portable module`. Its necessity can be reviewed at that time.
- I didn't spend the time to try building powershell in Visual Studio 2017. We should have a separate issue for that. It's tracked by #3400

The `TypeCatalogParser` project is replaced by a MSBuild target to gather the dependency information.
Due to .NET Core SDK issue [#1021](https://github.com/dotnet/sdk/issues/1021), our meta-package project `Microsoft.PowerShell.SDK` starts to generate an empty assembly during the build and that results in an empty assembly `Microsoft.PowerShell.SDK.dll` appear in `publish` folder and in `.deps.json` file. We cannot simply remove the assembly because it's now part of the TPA, and removing it will cause powershell to crash at startup. We have to live with this empty assembly until that .NET Core SDK issue is fixed.  It's tracked by #3401.
2017-03-23 13:04:52 -07:00
Travis Plunk 63ba98fd25 Add openSUSE support in download.sh (#3306) 2017-03-10 16:54:47 -08:00
Dongbo Wang 3a960db5b0 Update docs for alpha.17 release (#3298) 2017-03-10 11:32:19 -08:00
probonopd 669a34a27b Do not download from external sources (#3211)
This commit removes the external dependencies of the AppImage generation script by instead
downloading them from a known (and owned by Microsoft) location:
psgithub.file.core.windows.net.
2017-03-03 10:37:16 -08:00
Dongbo Wang 8b8d20d56b Work around the hang issue that happens when running class basic parsing tests (#3191) 2017-02-23 13:05:09 -08:00
Andrew Schwartzmeyer db93f411da Add Third Party Notices for AppImage
This license specifically covers the additional libraries that
are bundled inside the AppImage archive.
2017-02-17 11:09:36 -08:00
Andrew Schwartzmeyer 8185fd9350 Add AppImage to CI 2017-02-17 11:09:36 -08:00
probonopd 0e9d85084f Add AppImage tooling
* Use icon from local repository
  https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960616

* Use the deb that has been generated in this build

* Copyright and license
  https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960505

* MIT License for appimage.sh
  https://github.com/PowerShell/PowerShell/pull/2027#discussion_r75960505

* Full text of the MIT License is in license_thirdparty_proprietary.txt

* Clarify license and clean up unused code
  https://github.com/PowerShell/PowerShell/pull/2027#discussion_r76104601

* Mark appimage.sh as executable
2017-02-17 11:07:10 -08:00
Dongbo Wang d60dc730a4 doc updates for release alpha.16 (#3160)
* doc changes for alpha.16 release

* update spelling ignore file for new release
2017-02-16 09:09:45 -08:00
James Truher [MSFT] 250efcd39f Create a badge for the daily test runs in travis-ci (#3076)
* changes which enable setting a badge for the daily test runs in travis

It updates an azure blob with an SVG and that location is referenced by the
README.md file. TravisCI doesn't support this directly so in order to report
on the status of a daily test run there, we need to do this.
Provide error reporting in case the badge can't be set

* change new-object calls to use constructor

Remove extraneous date setting
update string creation to use stringbuilder rather than string addition
2017-02-01 15:53:30 -08:00
Jason Shirk (POWERSHELL) 4f02f48c69 Update links and docs for alpha.15 2017-01-18 15:09:50 -08:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
James Truher [MSFT] c97ca777df Jameswtruher/travisdailybuild (#2958)
* Stifle progress output in build.psm1 for some operations

Modify test failure presentation to use platform available XML methods

* Add timeout support for returning runtime parsing errors

Some of the language/parser tests have been hanging in a non-reproducable manner which
causes the CI system to invalidate the entire run. This change adds support for timeout
which will fail a test if it runs to long, rather than invalidate the entire run.

current behavior is still supported, and is not done in a new session:
PS> get-runtimeerror -src '1/'
At line:1 char:3
+ 1/
+   ~
You must provide a value expression following the '/' operator.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ExpectedValueExpression

Adding a timeout will do the operation in a async powershell session
PS> get-runtimeerror -src '1/' -timeout 5
You must provide a value expression following the '/' operator.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : ExpectedValueExpression

If the operation takes longer than the supplied timeout, a timeout error will be returned
PS> get-runtimeerror -src 'start-sleep 6' -timeout 2
get-runtimeerror : Operation Timed Out ('start-sleep 6')
At line:1 char:1
+ get-runtimeerror -src 'start-sleep 6' -timeout 2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-RuntimeError

* Modify native linux command tests to skip on Windows and pending on Mac

* remove verbose and progress output from help tests

* Be sure that Feature Counter tests only run on Windows

Also, only call add-type in CounterTestHelperFunctions.ps1 if we're going to actually run the tests

* do not run any get-computerinfo tests on non-windows systems

* suppress progress output from PowerShell Get tests

* remove -quiet from API and CRON Builds

Travis watches output from the build to ensure that it hasn't hung
we need to find a balance between too much output and not enough output.
A run which has too much output is killed because it looks like an error loop
A run which has too little output is killed because it looks like a hang

* Remove commented line in Import-Counter.Tests.ps1

Remove extraneous extra line in PowerShellGet.Tests.ps1

* Change `-as "type"` to `-as [type]` in build.psm1

Alter timeout to 10 seconds to be improve chances of not timing out for runtime parser checks
improve logic for counter tests to also skip for IoT

* use the existing function of SkipCounterTests rather than duplicate the logic in import-counter.tests.ps1
2017-01-10 14:42:27 -08:00
Jason Shirk 047cfdeaf0 Merge pull request #2893 from PowerShell/v6.0.0-alpha.14
V6.0.0 alpha.14 doc changes
2016-12-15 12:52:33 -08:00
Jason Shirk (POWERSHELL) 48b8542ada Update download.sh for v6.0.0-alpha.14 2016-12-15 11:54:31 -08:00
Aditya Patwardhan a06778ca75 Change package name to CodeCoverage.zip from Powershell_6.0.0... (#2886)
Changed the package name from the standard Powershell_6.0.0-xx-gxxxxxxx to
CodeCoverage.zip so that it is easier to download the latest package from
the AppVeyor permalink for last successful build.
2016-12-15 10:35:55 -08:00
Aditya Patwardhan 19c709b986 Added check for empty $nugetArtifacts (#2817)
When the build fails there are no $nugetArtifacts, so AddRange fails
2016-12-01 12:58:14 -08:00
James Truher [MSFT] 8e360bffb1 modify Start-PSPester to accept -Quiet to eliminate Pester output (#2795)
* modify Start-PSPester to accept -Quiet to eliminate Pester output

also modify travis.ps1 to include -Quiet for Pester args to reduce
stdout log size which should hopefully allow daily builds to run
without being cancelled due to too much output

* Add error detail information as part of Test-PSPesterResults

Test-PSPesterResults will now also emit information about the errors
found during a test run rather than just the number of failed tests.
Created a new errorlog function so the output of errors will be red.
2016-12-01 11:23:14 -08:00
Aditya Patwardhan 991d6075af Added -publish to codecoverage package generation and fixed package name (#2797)
* Added -publish to codecoverage package generation and fixed package name

Added -Publish to Start-PSBuild used by CodeCoverage configuration so that
.netcore dependencies are also included in the package. This makes the
package usable on systems that do not have .netcore in path.

Fixed the name of the coverage package by making it consistent with other
package names.

* Created a function to generate packagename
2016-11-28 17:57:04 -08:00
Aditya Patwardhan 157e9480eb Assigned all ArrayList.Add() to $null (#2776)
* Assigned all ArrayList.Add() to $null
ArrayList.Add() returns the array list size after the add. This causes the
value to be thrown on the pipeline. Assigning them to $null as we do not
need to know the size after addition. This causes errors and unnecessary
output on the AppVeyor console.
* Changed the way nuget artifacts are added to arraylist
* Remove unnecessary `$null =` for `AddRange` call because it's a void method.
2016-11-23 16:38:50 -08:00
Dongbo Wang 6f92140886 Add back -Configuration 'Release' to make sure AppVeyor CIs produce 'Release' bits (#2773) 2016-11-23 12:54:52 -08:00
Aditya Patwardhan ead4df4097 Moved publishing of code coverage artifacts to test_script phase (#2760)
* Moved publishing of code coverage artifacts to after_test phase

The webhook for build completion is called after the after_test phase
hence we needed to publish code coverage artifacts before that. Moved the
logic for compression and publish the artifacts after running tests.

* Added check for daily build

* Address code review comments.

* Addressed code review comments

Addressed comments about definition of artifacts.
Defined new function for after_test phase.
2016-11-23 12:22:18 -08:00
Sergei Vorobev 172b2234fc Fix broken travis.ps1 logic (#2739) 2016-11-21 09:48:41 -08:00
Jianyun Tao 9b27d4a23a add psmodulerestore in travis.ps1 2016-11-19 23:52:16 -08:00
Jianyun Tao bfe59b3495 # This is a combination of 3 commits.
# The first commit's message is:

Changed to PSModuleRestore switch, i.e., by default no PSModule install

# This is the commit message #2:

install PowerShell modules to publish folder as well as one level up

# This is the commit message #3:

removed workaround
2016-11-19 23:52:16 -08:00
Jianyun Tao 3de5e455df Use alpha.11 instead of alpha.12 to allow using OneGet to install modules from myget 2016-11-19 23:52:16 -08:00
Sergei Vorobev 961a76197b Replace travis.sh by travis.ps1
Fix problem with running Start-PSPester from the wrong directory
2016-11-18 17:45:57 -08:00
Sergei Vorobev 41f8c9c7df Remove redundent $buildConfiguration in appveyor.psm1 2016-11-18 17:45:57 -08:00
James Truher [MSFT] ca0be9ad61 Jameswtruher/dailytravis (#2696)
* Add daily build code for travis

A cron job needs to be created to start the build, and the variable
TRAVIS_DAILY_BUILD must be set to true

* Change environment variable to the one suggested by the travis-ci documentation

TRAVIS_EVENT_TYPE == "cron"
2016-11-17 11:59:55 -08:00
Aditya Patwardhan b18adb85d4 Add OpenCover PS Module to collect code coverage (#2585)
* Add OpenCover PS Module to collect code coverage

OpenCover PS Module helps is collecting Code Coverage using the OpenCover
toolset. The module helps in comparing two code coverage runs as well.

* Change OpenCover.psd1 to ASCII

* Fix an error in path for OpenCover

Fixed an error on path for OpenCover. Also used ZipFile class instead of
cmdlet as it might not be available on CI system.

* Convert module to be Powershell v4 compliant

Changed implementation from classes to PSObjects and implemented
Expand-ZipArchive.

* Added CodeCoverage as a configuration to project.json files

Added CodeCoverage as the new configuration for all the project.json
files. When Start-PSBuild is executed with configuration as CodeCoverage,
we change the degubType to 'full' as required by OpenCover toolset.

Also made changes to appveyor.psm1 to build a CodeCoverage package on
daily builds and publish it as a zip.

* Addressed code review comments

Changed from Add-Member to use pscustomobject type accelator. Removed
[gc]::collect.

* Added explicit garbage collection

* Addressed code review comments

- Make sure that the build Start-PSPackage gets is not a code coverage
  build
- Add debugType = full for FullCLR
- Remove configurations from PackageManagement files as it is not needed.
- Build CodeCoverage build first in AppVeyor.

* Resolve merge conflict

* Fix indentation

* Fix newline at end of file

* Added command discovery for locating OpenCover.console.exe
2016-11-11 11:12:07 -08:00
Mike Richmond ea6cacafd7 Change log and 6.0.0-alpha.12 version number updates (#2593) 2016-11-03 14:23:05 -07:00
Dongbo Wang 289e6958ef Update docs/scripts to use the alpha.11 release packages (#2498) 2016-10-18 13:09:09 -07:00
Paul Higinbotham 3815482082 Fix host remote test InvokeOnRunspace to work with AppVeyor (#2362)
* Fix host remote test InvokeOnRunspace to work with AppVeyor

* Updated to use new local account for remoting tests.

* Set the LocalAccountTokenFilterPolicy as needed.

* Adding verbose messages for debugging.

* Storing creds using Export-CliXml

* Added CITravis skip for Windows only remoting test

* Moving tests back to 'Feature' scope

* Added AppVeyor environment variable check to prevent account creation on non-appveyor configurations

* Removed It block in BeforeAll block

* Moving tests back to 'Feature'
2016-10-10 15:24:04 -07:00
Mike Richmond 374e1d1b21 Merge pull request #2280 from vors/admin-tests
Separate tests on Windows CI to Admin-Required and Non-Admin-Required
2016-09-29 16:28:29 -07:00
Aditya Patwardhan f1270cdc28 Add PS_DAILY_BUILD variable check in Test-DailyBuild (#2386)
The PS_DAILY_BUILD variable is set in the Appveyor environment in the
PowerShell [Daily] project. When this is set we want to have full daily
build.
2016-09-29 16:26:34 -07:00
Aditya Patwardhan f31d4a5ac2 Add archive with test content to AppVeyor artifacts for daily builds.
The change adds Compress-TestContent cmdlet to build.psm1 so that it can
compress the powershell test content. This is done only for daily builds.
2016-09-29 12:38:12 -07:00
Sergei Vorobev ed36f037ae Fix appveyor test runner logic for Admin and non-Admin tests 2016-09-29 12:29:27 -07:00
Sergei Vorobev d1d82d03b4 Make Invoke-AppVeyorTest run elevated and non-elevated tests separately
- Add RequireAdminOnWindows to the list of blessed tags
- Fix a bug in Get-PesterTag where we accepted 'Slow' as a proper priority
- Fix missed comma in Start-PSPester parameters
- Add documentation about new Pester tag
- Fix finishing logic for Start-PSPester -Unelevate
2016-09-29 12:29:27 -07:00
Dongbo Wang 18f732f1e0 Improve Start-PSPackage to support zip package, downlevel packages for win-plat. Fix the version issue and package name for creating msi and appx (#2361)
* Improve Start-PSPackage to support zip package, downlevel packages for win-plat. Fix the version issue and package name for creating msi and appx

* Address comments about New-PSOptions

* Update Start-PSPackage to not show the warning from New-PSOptions
2016-09-28 10:47:16 -07:00
Andrew Schwartzmeyer 8a24d26e8d Patch System.Net.Http.Native.dylib
Again, .NET Core expects users to forcibly link the third party OpenSSL
libraries into system directories, which the Homebrew team advises
strongly against (and attempts to prevent). This also affects the
System.Net.Http library, and results in runtime errors during SSL
certificate validation. So instead, we patch what we can, when we can.
2016-09-20 14:34:32 -07:00
Andrew Schwartzmeyer e5d35807bb Update download.sh to install all dependencies 2016-09-20 13:57:36 -07:00
Andrew Schwartzmeyer d183d7944f Update download.sh and Dockerfile links
This is a breaking change until the release is posted.
2016-09-15 13:59:46 -07:00
Andrew Schwartzmeyer 27530c403c Use direct download URLs instead of API
GitHub's API is throttled to 60 requests per hour per IP address when
for non-authenticated calls, which was causing severe CI flakiness.
While this adds another set of URLs to update for each release, the
alternative was adding an OAuth token and maintaining its ownership.
Moreover, this code is simpler than the previous API parsing.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 363657717c Handle package download failure 2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer e337d93720 Install OpenSSL via Homebrew on macOS
Since it is required. Note that we do *not* unsafely link the OpenSSL
libraries into the system folders, as we instead patch .NET Core's
libraries to find OpenSSL in the installed location.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 6b582851d6 Don't download package silently
Otherwise users think it's slow or hung.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer 25eab9a2e5 Quote all $variables
For paranoia.
2016-09-02 17:17:20 -07:00
Andrew Schwartzmeyer e3cf257a7d Use hash to check for curl
Our shebang is Bash.
2016-09-02 17:17:20 -07:00
Travis Plunk 0d5ae4692b Add support for running all tests on scheduled builds
Only produce nuget packages if tests pass
2016-08-31 13:02:35 -07:00