Commit Graph

70 Commits

Author SHA1 Message Date
Andrew Schwartzmeyer
0c62b9a12d Always build ConsoleHost as top project 2016-05-17 13:28:44 -07:00
Sergei Vorobev
7ab2a51ae4 Add workaroud for OS X packaging utime bug 2016-05-16 14:53:40 -07:00
Sergei Vorobev
9401e4f30f Fix warning message in Strt-PSBuild 2016-05-15 12:51:57 -07:00
dantraMSFT
da0247f304 Update location where Start-PSBuild expects to find dotnet.exe 2016-05-13 16:49:39 -07:00
Andrew Schwartzmeyer
ae24cfe86c Pin AppVeyor to .NET CLI 1.0.0-rc2-002655
The preview channel's latest is no good.
2016-05-06 13:57:19 -07:00
Andrew Schwartzmeyer
eb92b28965 Add Start-PSBuild -Output switch
When specified, it will join the given path relative to the PowerShell
repository. This is useful to choose where the built artifacts will
end-up, which is necessary to fix VS Code tasks.
2016-05-06 10:28:45 -07:00
dantraMSFT
8777de5c8d Change NUGET_PACKAGES env setting to be conditioned on IsWindows 2016-05-05 13:49:39 -07:00
dantraMSFT
585eefc7a0 Update PS build script to set env:NUGET_PACKAGES to support custom package installation directory. 2016-05-05 13:49:39 -07:00
Andrew Schwartzmeyer
a48abd0b6c Fix xUnit tests for new framework
This also enables us to run them on OS X (though they will fail).
2016-04-25 14:11:13 -07:00
Andrew Schwartzmeyer
ea5d5c3d05 Switch to netcoreapp1.0
Instead of using `dotnet publish`, we can use `dotnet build` and the new
`netcoreapp1.0` framework with a new dependency on
`Microsoft.NETCore.App` to generate output that does not include the
runtime, but can be run anywhere (given the installation of the
runtime).

While we cannot yet adopt a dependency on the shared host until .NET
Core RTM, we are forced to switch to this system anyway because the
latest RC3 packages and CLI do not support `netstandardapp1.5`. See
dotnet/cli#2482.

Thus we're in an in-between state where we have to use `netcoreapp1.0`,
but cannot use `"Microsoft.NETCore.App": { "type": "platform" }` to
utilize the shared host, as we need to continue to ship our host.
Without specifying "platform", we retain the status quo with respect to
build steps and outputs.

Additionally, there is no longer a good reason to use the RC3 packages,
and it has been advised we switch to RC2 since the
`Microsoft.NETCore.App` is only available for RC2. We must update
packages because our current version can no longer be debugged.
2016-04-25 14:01:44 -07:00
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