Commit Graph
60 Commits
Author SHA1 Message Date
Andrew Schwartzmeyer ea73db0d68 Make Start-PSBootstrap re-install dotnet on Windows
It now helpfully deletes the previous `dotnet` directory so that older
versions of the CLI don't muck things up.
2016-04-20 15:21:55 -07:00
Sergei Vorobev 33c458459c Wrap all native commands in helper function in PowerShellGitHubDev.psm1 2016-04-19 16:59:03 -07:00
Sergei Vorobev f28bd0814b Fix log message in Start-PSBuild 2016-04-19 16:40:28 -07:00
Sergei Vorobev 8635c84cd9 Fix typo in PowerShellGitHubDev.psm1 2016-04-19 16:10:09 -07:00
Andy Schwartzmeyer a655b439bc Merge pull request #850 from PowerShell/andschwa/fix-xunit
Re-enable xUnit tests on Linux
2016-04-18 19:27:55 -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 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 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 19ab0de84c.
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 7538951dfa Install package dependencies in download.sh 2016-04-13 19:24:12 -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 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 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 13e0760e16 Fix build module for removal of Platform module 2016-04-08 15:13:50 -07:00
Andrew Schwartzmeyer bfaad3f057 Programmatic update of core console host rename 2016-04-08 10:59:41 -07:00
Sergei Vorobev d181ef787b Make Start-ResGen generate folders for cs files 2016-04-05 15:16:55 -07:00
Sergei Vorobev 4cb0ef5a75 Update default for Start-DevPSGitHub -binDir parameter 2016-04-04 18:58:53 -07:00
Sergei Vorobev cefc16da4f Add Start-ResGen to PowerShellGitHubDev.psm1
Now everybody can just run resgen, instead of kicking in Jenkins job
2016-04-04 14:20:34 -07:00
Andrew Schwartzmeyer a6fd5c70d9 Fix FullCLR build script for build instead of publish 2016-04-01 23:10:34 -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 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 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
Andrew Schwartzmeyer a9f1603a97 Rename dotnet restore arguments variable 2016-04-01 18:15:43 -07:00
Andrew Schwartzmeyer 2b46e0d5eb Add $script:Output to store location of executable 2016-04-01 17:56:07 -07:00
Andrew Schwartzmeyer fde63f4bc0 Add win81-x64 runtime
It's what AppVeyor uses.
2016-04-01 17:52:00 -07:00
Andrew Schwartzmeyer 1293c63289 Deploy powershell.exe as content for ConsoleHost
CMake will now output the artifacts of the native build into the
ConsoleHost project, where .NET CLI picks it up as content and deploys
it automatically.
2016-04-01 16:48:16 -07:00
Andrew Schwartzmeyer bf470de5ca Obtain runtime from dotnet --info
This is a breaking change that requires developers to update their
version of .NET CLI. In order to stop specifying where dotnet should
output the artifacts, we need to be able to guess their location
correctly, which requires knowing the current RID (and framework).
2016-04-01 14:48:41 -07:00
Andrew Schwartzmeyer 6cf8e39d1a Refactor native build steps
Move dependency checks to precheck section and make conditional more
sensible.
2016-04-01 14:48:41 -07:00
Andrew Schwartzmeyer aa5c30d42e Whitespace and style cleanups 2016-04-01 14:48:41 -07:00
Andrew Schwartzmeyer 34f6b44d99 Remove --runtime argument to dotnet restore 2016-04-01 14:48:41 -07:00
Andrew Schwartzmeyer 5c1e295e9a Remove -Output switch from PowerShellGitHubDev
This is a breaking that stops publishing PowerShell by default, and
instead relies on `dotnet build`. Thus the artifacts will be output to a
new (RID, framework, and project dependent) location.

Publishing will still be needed to produce packages, but this logic will
be moved into `Start-PSPackage`.
2016-04-01 14:47:30 -07:00
Sergei Vorobev 136e0eecea Fix typo in PowerShellGitHubDev.psm1 mapping 2016-03-30 14:13:36 -07:00
Sergei Vorobev 0ff62f7fc5 Add resources mapping capability to New-MappingFile 2016-03-29 16:56:57 -07:00
Sergei Vorobev 7581df6bea Add Send-GitDiffToSd function to simplify sd workflow
This function will help us to port changes to source-depot
from server2016 branch
2016-03-29 16:56:55 -07:00
Sergei Vorobev 4556eaf6a7 Add mapping to enable psl-monad submodule removal
There are 2 functions:

- New-MappingFile - creates mapping.json from project.json files
  (one is included in this commit)

- Copy-SubmoduleFiles - enables copying files back and forth from
  submodule to src/<projects> based on mapping.json file
2016-03-29 16:56:54 -07:00
Andrew Schwartzmeyer 03c452c98c Deploy native library automatically 2016-03-29 11:18:12 -07:00
Andrew Schwartzmeyer f9e7e6c89c Handle Start-PSBuild -Restore -Runtime ...
If a runtime is given, we need to restore for that particular runtime as
well.

This also enables `Warning` `dotnet restore` output, and increases the
verbosity to `Info` if `-Verbose` is used.
2016-03-25 15:08:30 -07:00
Sergei Vorobev 0cb76a9a09 Remove explicit msbuild requirement
Fix #684
We already require VS 2015 installation.
Grab msbuild automatically from .NET framework folder.
2016-03-18 12:01:18 -07:00
Sergei Vorobev 99a55b7a72 Fix #528 : make powershell.exe build with VS 2015
Add legacy_stdio_definitions.lib to the list of linked assemblies
2016-03-15 13:06:26 -07:00
Sergei Vorobev b126d698e2 Hide output of dotnet restore by default
Address Andy's comments about build script.
Add more information about the version into build
Use windows inbox version of pester for FullCLR
Revert dotnet cli to a known good version to avoid #638
2016-03-11 18:24:43 -08:00
Sergei Vorobev b28d96d700 Incorporate build.FullCLR.ps1 in PowerShellGitHubDev.psm1
This commit fixes #652
2016-03-11 16:19:05 -08:00
Andrew Schwartzmeyer 05ef797849 Add -Clean switch to Start-PSBuild
And use full names of cmdlets.
2016-03-07 16:43:05 -08:00