Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer 957966508f Whitespace cleanup 2016-04-20 14:09:16 -07:00
Andrew Schwartzmeyer b2ae01fc3e Fix cryptic Pester failure
When the Pester tests were invoked over PSRP and the environment was
more pristine than a local client, the lack of a "foo" variable in some
scope caused the Pester test suite to emit an error at the end, failing
the PSRP build.

Removing the Clear-Variable directive eliminates this error, and is not
necessary for the Pester test itself.
2016-04-20 14:07:40 -07:00
Andrew Schwartzmeyer 0b91bf718f Whitespace clean up and re-indent 2016-04-20 10:48:08 -07:00
Andrew Schwartzmeyer 5c7fcbb462 Enable xUnit tests on Linux
We have to pretend they pass on OS X for now.
2016-04-14 18:07:33 -07:00
Andrew Schwartzmeyer 3b24ba5dd3 Allow default ALC to not be PowerShell's. 2016-04-14 18:07:33 -07:00
Andrew Schwartzmeyer dc9b4c595d Fix xUnit tests for Linux
The latest xUnit packages fix the "could not resolve coreclr path"
problem we were having. To resolve all dependencies, the cli-deps feed
was replaced with the aspnet feeds.

However, the latest xUnit packages do not allow us to set the default
AssemblyLoadContext.
2016-04-14 18:06:57 -07:00
Andrew Schwartzmeyer 94e5469458 Refactor options into New-PSOptions
Deduction of PowerShell output path is now done in `New-PSOptions`,
which returns a hash table representing the build options, so that it
can be done outside of `Start-PSBuild`.

`Start-PSBuild` saves the options it creates as a script-local variable,
`$script:Options`.

`Get-PSOutput` will either unwrap the an options hash table parameter,
the script local options hash table, or use the default options.

Thus, if `Start-PSBuild` hasn't been run, it can be used to get the
output path given non-default options like this:

```powershell
Get-PSOutput -Options (New-PSOptions -Publish)
```

Or simply call `Get-PSOutput` to get the best-guess default path.

Note that because ValidateSet does not support the use of constant
variables, the set of runtimes has to be duplicated, and an empty
runtime is supported.
2016-04-14 18:06:04 -07:00
Andrew Schwartzmeyer e8ed0b45d7 Clean up whitespace in build module 2016-04-14 18:06:04 -07:00
Andrew Schwartzmeyer 40b3888dcb Revert use of foreach in ALC
I forgot to revert this in #814, thanks @daxian-dbw for the pointer.
2016-04-14 17:34:00 -07:00
Andrew Schwartzmeyer 50093b202a Update documentation for OS X testing
Copy the Travis CI badge for 10.11. It is the same badge, but it will
fail if the build fails. I don't see a way to have separate badges, but
this highlights that the platform is being tested.
2016-04-14 11:26:34 -07:00
Andrew Schwartzmeyer b930eeef9f Disable broken OS X Pester tests
- The Get-Process cmdlet on OS X has issues due to permissions
- The Get-Process test in NativeLinuxCommands should have been removed
- The ProcessName property has the same bug that has been fixed on Linux
2016-04-14 10:05:51 -07:00
Andrew Schwartzmeyer 745fd43ede Increase ulimit on OS X 2016-04-14 09:45:18 -07:00
Andrew Schwartzmeyer 6851fe374c Enable OS X on Travis
Remove unsupported osx.10.10-x64 moniker. Use `osx_image: xcode7.3` to
get an OS X 10.11 image on Travis.
2016-04-14 09:45:18 -07:00
Andrew Schwartzmeyer b2bc4183fe Disable Travis CI OS X support
Unfortunately, Travis CI's OS X machines are 10.9.5, per
https://docs.travis-ci.com/user/osx-ci-environment/#CI-environment-OS.
While NuGet supports the RID, .NET Core does not yet publish 10.9
packages, resulting in a build failure we can't do anything about.

I've asked for best-effort support by providing runtime packages for
10.9 in dotnet/corefx#7731.

Revert "Add OS X 10.9 runtime"

This reverts commit 19ab0de84cec37bb90443df14d4e69f10c41e1b1.
2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer ed62e5c6e6 Add OS X 10.9 runtime 2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer 3d21d5da93 Deal with paths magically in Start-PSBuild 2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer beccce54a8 Use matrix.include and fix OS X PATH 2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer 14837da664 Update documentation for Start-PSBootstrap
Also moved Git setup section first.
2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer 38041211b5 Remove deprecated omibuild and psrp scripts 2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer aa1af214bc Add OS X to Travis CI matrix 2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer 7538951dfa Install package dependencies in download.sh 2016-04-13 19:24:12 -07:00
Andrew Schwartzmeyer 70f921e824 Update AppVeyor to use Start-PSBootstrap 2016-04-13 19:24:11 -07:00
Andrew Schwartzmeyer 995eaf4c0f Update Travis to use Start-PSBootstrap 2016-04-13 19:24:11 -07:00
Andrew Schwartzmeyer a031dd9095 Remove deprecated bootstrap.sh 2016-04-13 19:24:11 -07:00
Andrew Schwartzmeyer d94a040229 Add Start-PSBootstrap function
Installs Open PowerShell build dependenices on all platform; deprecates
`bootstrap.sh`.
2016-04-13 19:24:04 -07:00
Andrew Schwartzmeyer a5dfe80d9a Download and install packages for Ubuntu and OS X
This both downloads the v0.3.0 release for the current platform and now
also installs it (requiring `sudo`). Should probably rename.
2016-04-13 18:58:23 -07:00
Andrew Schwartzmeyer 9fc0dd451b Import-Module PowerShellGitHubDev in build.sh
Make it Do What I Mean.
2016-04-13 18:56:23 -07:00
Andrew Schwartzmeyer e210cf14c0 Bump Pester with fixes 2016-04-13 14:57:20 -07:00
Andrew Schwartzmeyer 1bc2a9e576 Fix stack overflow exception when loading assemblies
When an assembly that exists outside of the trusted platform assembly
list but in the GAC on Windows was loaded, the use of `Assembly.Load`
before the `LoadFromAssemblyPath` caused a recursive loop to occur.

This happens because an `Assembly.Load` on a not-yet-loaded
assembly is overridden, thus calling back into the
`AssemblyLoadContext.Load` override.

By attempting to load from the file path first, we avoid this loop.
However, loading TPA assemblies by their path throws an exception, so
now we catch this particular exception and attempt the load through
`Assembly.Load`.

This is safe for TPA assemblies since they're already loaded, thus the
`Assembly.Load` does not re-load the assembly, but simply returns it.
2016-04-13 09:40:16 -07:00
Andrew Schwartzmeyer 841f76ec37 Update Git setup documentation
Now that everyone needs all the submodules. Much simpler.
2016-04-12 16:16:17 -07:00
Andrew Schwartzmeyer 285253da02 Disable xUnit tests on Travis temporarily
Until #806 is resolved.
2016-04-12 16:00:05 -07:00
Andrew Schwartzmeyer b8f326adf5 Redirect PSRP documentation to other repo 2016-04-12 15:59:38 -07:00
Andrew Schwartzmeyer a2fc6c330a Remove PSRP building documentation
Migrated to PSRP repository
2016-04-12 15:18:27 -07:00
Andrew Schwartzmeyer 1f19758614 Remove OMI and provider submodules 2016-04-12 12:10:54 -07:00
Andrew Schwartzmeyer ea53a15642 Update download.sh to get v0.3.0 deb asset 2016-04-11 12:41:58 -07:00
Andrew Schwartzmeyer 735a702f1c Remove alias tests for Write-Output
The `echo` and `write` aliases were removed, which make these tests
inaccurate (but did not fail them).
2016-04-11 10:46:39 -07:00
Andrew Schwartzmeyer 71b55abf66 Bump .NET Core packages to build 24011
And update the CorePsTypeCatalog.
2016-04-11 10:37:15 -07:00
Andrew Schwartzmeyer e0547c81ff Update Linux installation documentation for v0.3.0 2016-04-11 09:50:58 -07:00
Andrew Schwartzmeyer 0afd4c2f98 Improve Start-PSPackage
- Now checks that previous Start-PSBuild was with -Publish
- Uses $script:Output automatically
- Uses /opt/microsoft/powershell on Linux per FHS
- Uses /usr/local/microsoft/powershell on OS X per FHS
- Specifies "--rpm-os linux" for RPM packages built elsewhere
- Creates symlink on demand for packaging
- Puts symlink in /usr/(local)/bin as it is expected to be in PATH
- Uses $Arguments array for better syntax
- Resolves #800

Note that if the target of the powershell symlink exists, `fpm` aborts
with a `utime` error on OS X.
2016-04-09 19:44:55 -07:00
Andrew Schwartzmeyer 865f174e22 Clean up comparison operators in build module 2016-04-09 18:56:14 -07:00
Andrew Schwartzmeyer 3a43126a2e Allow creation of symlink to non-existent target
This action is completely valid on both Windows and Linux (and OS X)
operating systems; tested with `mklink` and `ln -s` respectively.

Note that targets for hard links must exist, thus we check specifically
for symbolic links.

Both the path globber in session state and the `New-Item` implementation
needed to be fixed to allow the target not to exist.

Resolves #801.

Also enable symbolic link tests on Windows.
2016-04-09 18:45:23 -07:00
Andrew Schwartzmeyer 70c23dacd7 Fix Get-Help -Online
While Windows will automatically open a URL used as a process by
launching a browser, OS X needs to use `open <URL>`, and Linux needs to
use `xdg-open <URL>` (the most distribution-independent way).

Resolves #802.
2016-04-09 18:05:49 -07:00
Andrew Schwartzmeyer 022a63c6d2 Fix whitespace in csharp/project.json 2016-04-08 21:58:05 -07:00
Andrew Schwartzmeyer bd03b51c32 Respect PAGER variable and default to less on Linux 2016-04-08 21:52:14 -07:00
Andrew Schwartzmeyer 7ace2b6b64 Fix NuGet warnings by depending on NuGet.Packaging.Core
And upgrade dotnet-test-xunit
2016-04-08 21:50:24 -07:00
Andrew Schwartzmeyer feef62c5ea Bump .NET Core packages to 24004 2016-04-08 21:50:24 -07:00
Andrew Schwartzmeyer 6f45601a27 Rename profile from PSL to Microsoft.PowerShellCore
Final fix for #713.
2016-04-08 21:41:29 -07:00
Andrew Schwartzmeyer 839014b599 Try Assembly.Load correctly
This should resolve #791.

Instead of checking if `Assembly.Load` returned null (it doesn't), check
if it threw `FileNotFoundException`, which it will if it doesn't find
the assembly.
2016-04-08 19:09:38 -07:00
Andrew Schwartzmeyer 733cda385d Fix accidental mapping change
Happened in programmatic update commit bfaad3f05.
2016-04-08 18:09:09 -07:00
Andrew Schwartzmeyer ac157568d6 Publish on AppVeyor
So that the artifacts for Core PowerShell have the .NET Core
dependencies.
2016-04-08 16:25:53 -07:00
Andrew Schwartzmeyer d7233fc4d0 Remove import of Platform module from AppVeyor 2016-04-08 16:25:53 -07:00
Andrew Schwartzmeyer 92a34cba5f Add Publish switch to Start-PSBuild
Note that it is mutually exclusive with `FullCLR` as libraries are not
publishable; only applications can be published.
2016-04-08 16:25:53 -07:00
Andrew Schwartzmeyer f5a95a6ef5 Remove unsupported -Clean switch
Will put back when it is functional.
2016-04-08 16:25:53 -07:00
Andrew Schwartzmeyer 73fe95feb8 Add tests for removal of aliases 2016-04-08 15:52:37 -07:00
Andrew Schwartzmeyer b3521944ec Fix Pester test 2016-04-08 15:23:38 -07:00
Andrew Schwartzmeyer 8c7174de10 Fix xUnit tests 2016-04-08 15:22:37 -07:00
Andrew Schwartzmeyer 13e0760e16 Fix build module for removal of Platform module 2016-04-08 15:13:50 -07:00
Andrew Schwartzmeyer bcdad12c04 Fix tests for removal of Platform module 2016-04-08 15:13:01 -07:00
Andrew Schwartzmeyer fffaf4cfe2 Remove Platform module 2016-04-08 15:11:33 -07:00
Andrew Schwartzmeyer 822244d261 Fix properties
Static but not const, go figure.
2016-04-08 15:08:16 -07:00
Andrew Schwartzmeyer a082a02e6c Add PowerShell variables corresponding to platform
This deprecates the Microsoft.PowerShell.Platform module and ensure that
IsLinux/OSX/Windows/Core variables are defined all throughout PowerShell.
2016-04-08 15:04:27 -07:00
Andrew Schwartzmeyer 49066d212a Replace IsX method with IsCore property 2016-04-08 15:04:16 -07:00
Andrew Schwartzmeyer f5410a18ce Replace IsWindows method with property
And add *correct* IsLinux and IsOSX properties.
2016-04-08 14:54:41 -07:00
Andrew Schwartzmeyer 6f2110f38a Replace use of IsLinux with IsWindows
So that IsLinux can stop being overloading for OS X.
2016-04-08 14:50:37 -07:00
Andrew Schwartzmeyer 5b3840f753 Deploy Platform module on all flavors 2016-04-08 13:38:08 -07:00
Andrew Schwartzmeyer 2bd274f5d7 Fix tests broken by removal of aliases 2016-04-08 13:36:54 -07:00
Andrew Schwartzmeyer 47a8ee5bcf Remove A:...Z: drive functions on Linux / OS X
Resolves #612.
2016-04-08 12:50:53 -07:00
Andrew Schwartzmeyer 7d9f439666 Remove conflicting aliases for Linux and OS X
The aliases which conflict with Linux native commands were consolidated
and removed with the pre-processor definition `LINUX`. Additionally,
several "conflicts" are purposefully kept and likewise consolidated.
They are kept because Bash itself stomps on the native commands with its
own built-ins, and so we're adopting the same behavior.

The `clear` and `more` aliases are edge cases where the functions they
call are already fixed for Linux, and so we keep these too.

Resolves #567.
2016-04-08 12:50:47 -07:00
Andrew Schwartzmeyer 9288df09a1 Rename CoreConsoleHost host.cs Name
Fully resolve #713.
2016-04-08 11:00:52 -07:00
Andrew Schwartzmeyer bfaad3f057 Programmatic update of core console host rename 2016-04-08 10:59:41 -07:00
Andrew Schwartzmeyer 5abda1c223 Rename Host to CoreConsoleHost
To resolve part of #713.
2016-04-08 10:57:57 -07:00
Andrew Schwartzmeyer bc7030dae0 Deprecate build.sh script
If `powershell` is installed, run `Start-PSBuild` to ensure DWIM. Else,
direct user to Linux / OS X build documentation.

Resolves #767.
2016-04-07 14:19:35 -07:00
Andrew Schwartzmeyer e97ccc1c5f Refer to contributing guidelines in building documentation
For #771.
2016-04-07 13:56:20 -07:00
Andrew Schwartzmeyer d7f60447ec Quick markdown cleanups 2016-04-07 13:56:20 -07:00
Andrew Schwartzmeyer 4960e6e39c Refactor submodule documentation
Moved notes on submodules out of contributing guidelines and into
`docs/git/submodules.md` as most developers will touch them infrequently
now.
2016-04-07 13:56:20 -07:00
Andrew Schwartzmeyer fe0ad12598 Update test documentation 2016-04-04 19:20:26 -07:00
Andrew Schwartzmeyer 51fcd5cdb4 Update Windows Full building documentation 2016-04-04 19:18:15 -07:00
Andrew Schwartzmeyer 9bad78a435 Update Windows Core building documentation 2016-04-04 19:08:03 -07:00
Andrew Schwartzmeyer 3ad6afbec4 Update OS X building documentation 2016-04-04 19:08:03 -07:00
Andrew Schwartzmeyer 11d07d7f42 Update Linux building documentation 2016-04-04 19:08:03 -07:00
Andrew Schwartzmeyer a6fd5c70d9 Fix FullCLR build script for build instead of publish 2016-04-01 23:10:34 -07:00
Andrew Schwartzmeyer 4a7a521077 Fix powershell-native output directory
Thanks Stack Overflow https://stackoverflow.com/a/7750816
2016-04-01 23:10:33 -07:00
Andrew Schwartzmeyer 1b3bd12230 Don't load Netwonsoft.Json from path
It's already loaded.
2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer d27ae18ca0 Skip Add-Type.Tests.ps1
This broke and needs to be fixed.
2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer b9d8e890c5 Remove deprecated pester.sh script 2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer aa21bfc635 Use Start-PSPester on Travis 2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer a3cd2b3453 Add Start-PSPester function to replace pester.sh
Super basic function that should be rewritten.
2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer b19fdb24ac Throw in Get-PSOutput 2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer 68879655a5 Formatting and function extractions 2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer f3f0bc0b11 Fix Pester path for Travis 2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer c66375e82d Fix paths for AppVeyor 2016-04-01 22:35:00 -07:00
Andrew Schwartzmeyer a158bf654d Disable Travis cache 2016-04-01 20:49:23 -07:00
Andrew Schwartzmeyer 4601340f54 Use Start-PSxUnit on Travis 2016-04-01 20:49:03 -07:00
Andrew Schwartzmeyer 3895492da1 Remove deprecated update-content.sh 2016-04-01 20:47:58 -07:00
Andrew Schwartzmeyer b8cec0a00e Remove deprecated xunit.sh script 2016-04-01 20:46:24 -07:00
Andrew Schwartzmeyer 8e397ec1a1 Add Start-PSxUnit function
Replaces `./xunit.sh` to run xUnit tests on Linux. Pretty basic, can
definitely be extended to support other flavors.
2016-04-01 20:45:32 -07:00
Andrew Schwartzmeyer 067609cdce Add runtimes back to xUnit runner
Per dotnet/cli#2201
2016-04-01 20:25:12 -07:00
Andrew Schwartzmeyer 151b5525c6 Merge src/Modules and host specific Modules 2016-04-01 19:40:18 -07:00
Andrew Schwartzmeyer 6d691de665 Log location of PowerShell build output 2016-04-01 19:15:52 -07:00
Andrew Schwartzmeyer 5a1666c984 Fix programatic references to Linux.Host 2016-04-01 19:15:41 -07:00