Commit graph

47 commits

Author SHA1 Message Date
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
Andrew Schwartzmeyer 4e76a6261f Validate -Runtime 2016-03-07 16:43:05 -08:00
Andrew Schwartzmeyer e349704fa1 Add Start-PSPackage -Type switch to build any output
If not specified, "deb" is used as default on Linux. This should be
updated to check the distribution and required package build
dependencies.

Dependency names switched per package type, since specific package names
are different. Should check if this causes an issue on OS X when the
names are empty.
2016-03-07 16:43:05 -08:00
Andrew Schwartzmeyer e1c0f68098 Add switch to Start-PSBuild any specific -Runtime
Much better argument passing to CLI. Thanks @vors.
2016-03-07 16:08:50 -08:00
Andrew Schwartzmeyer 7673c4e90f Add Microsoft.PowerShell.Platform module
- Exports the IsCore, IsLinux, IsOSX, and IsWindows variables
- Imported by the default PSL profile
- Can be used automatically in Pester tests and Open PowerShell sessions
- Should maybe become a default module once it is polished
- PowerShellGitHubDev module does not explicitly use it because on
  FullCLR PowerShell (normal Windows development) it will not be
  imported automatically
2016-03-04 12:11:01 -08:00
Andrew Schwartzmeyer 91456111bf Fix current working directory for CMake
There is no way around this. The directory where CMake is invoked is
where it writes its build files, so we have to `pushd`. In case anything
fails, we `popd` in a finally block.
2016-02-24 11:50:56 -08:00
Andrew Schwartzmeyer 594bdacb6a Improve Start-PSBuild and Start-PSPackage functions
- Better comments
- Better indentation
- Working directory agnostic (uses `$PSScriptRoot`)
- Does not `cd`
- `PSPackage` does not call `PSBuild`
- Asserts that `bin/powershell` exists
- Derives version from `git describe` if not given
- Version parameter now a string to support metadata
2016-02-23 16:21:00 -08:00
Andrew Schwartzmeyer a7177c24e2 Catch exception when used on FullCLR
This is the case when the module is used on FullCLR versions of
PowerShell (necessarily on Windows).
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 472b17d547 Add Start-PSPackage command to build deb/pkg packages
Deprecates `package.sh`. Committed necessary package symlink because
creating one with PowerShell is not yet implemented.
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer 1453048674 Add cross-platform Start-PSBuild function
This can replace `build.ps1` and `build.sh`. However, we need to upload
packages so Travis can use PowerShell.
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer d3c6d274ed Fix capitalization of GitHub in dev module's name 2016-02-22 11:29:03 -08:00
Renamed from PowerShellGithubDev.psm1 (Browse further)