Commit Graph

32 Commits

Author SHA1 Message Date
Andrew Schwartzmeyer
730c8f04fe Use -noprofile in build.sh 2016-05-18 14:25:17 -07:00
Andrew Schwartzmeyer
fcf4b38370 Rename PowerShellGitHubDev.psm1 to build.psm1 2016-05-18 13:58:59 -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
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
5a1666c984 Fix programatic references to Linux.Host 2016-04-01 19:15:41 -07:00
Andrew Schwartzmeyer
497afcd237 Fix build.sh for new location of libpsl-native 2016-03-29 11:46:16 -07:00
Andrew Schwartzmeyer
c8891bb5a0 Copy user permissions to group and other in bin/*
Necessary for packages so that the libraries/deps files are readable,
even when owned by root (because it was installed from a package).
2016-02-22 11:29:03 -08:00
Andrew Schwartzmeyer
3f37dfa438 Improve build.sh script
- Check for cmake, g++, and dotnet programs.
- Check for project.lock.json.
- Check that libpsl-native was compiled.
2016-02-19 14:58:48 -08:00
Andrew Schwartzmeyer
e6e4dcafbe Build with new framework and new CLI
All libraries now use the framework `netstandard1.5`, and import the
`dnxcore50` and `portable` frameworks. The app that is published,
Microsoft.PowerShell.Linux.Host, that is, the top-level dependency that
emits an executable, instead targets `netstandardapp1.5` and has a new
`runtimes` key so that .NET CLI's `restore` and `publish` commands know
which runtime implementations to resolve.

When switching to the new CLI, we needed to fix how we specified our
dependencies. In particular, the .NET CLI team helped me figure out how
to download packages that are reference assembly only on Linux, with
implementations on Windows. The result of this is the new `frameworks`
setup.

Additionally, we were incorrectly specifying our build dependencies;
that is, projects we also build (not packages). The solution was much
cleaner. We removed the `type: build` section and replaced it with the
version `1.0.0-*` that all our projects currently use.

The `project.json` files also had their names, descriptions,
indentation, and versions fixed.

The build scripts were simplified.
2016-02-18 10:06:56 -08:00
Andrew Schwartzmeyer
5916b00261 Fix handling of bin directory 2016-02-10 13:05:46 -08:00
Andrew Schwartzmeyer
dacaebefb8 Move Pester to submodule to Host/Modules
This way it can also be deployed automatically, removing the last manual
copy steps from our build scripts.

Travis and AppVeyor configurations updated for new submodule location.
2016-02-10 12:58:56 -08:00
Andrew Schwartzmeyer
74a3855602 Add Modules to tree for content
Same as ps1xml files: already deployed in the wild, i.e. not source
code. Allows to remove recursive copies from build scripts and rely just
on CLI's behavior.
2016-02-10 12:48:46 -08:00
Andrew Schwartzmeyer
9f95aa3203 Use content to publish PSL_profile.ps1 2016-02-10 12:44:49 -08:00
Andrew Schwartzmeyer
9a2a8555e3 Copy ps1xml files into tree to use content
This allows us to remove the duplicated copying steps from our Windows
and Linux build scripts. These files are already distributed to users of
Windows, and so are not "source code."
2016-02-10 12:38:00 -08:00
Andrew Schwartzmeyer
fcb2ce6d71 Remove registry stub
With latest changes to PowerShell source code, and better behaviors of
Get/Set-ExecutionPolicy, the Windows registry API stub can be removed.
2016-02-09 16:10:10 -08:00
Andrew Schwartzmeyer
17a50a9f91 Remove temporary dotnet-publish workaround
Latest dotnet-nightly packages have not required this.
2016-02-03 15:21:29 -08:00
Andrew Schwartzmeyer
172ddc6ad1 Refactor project.json dependencies
The packages are now dependencies of the `dnxcore50` framework itself,
rather than globally. The `compilationOptions` were pruned, with
`CORECLR` moved to frameworks, `_CORECLR` removed for all but
`Management.Infrastructure`, and `LINUX` moved to a new `Linux`
configuration, used only in `build.sh`. This configuration is
purposefully absent from libraries that do not use `LINUX`, so that it
is not relied upon without strong consideration. The dependencies
were pruned to reduce duplication.
2016-02-02 15:43:54 -08:00
Andrew Schwartzmeyer
52a7095056 Use Modules instead of SnapIns
Proper deployment of the Modules we support allowed me to remove my
work-arounds using the deprecated SnapIn system to load all PowerShell
libraries via Modules.

I still don't like that this is done in build scripts, but we need
better asset support from .NET CLI to change how this is done.

PowerShell.Utility now deploys the CoreClr manifest, so unsupported
commands don't show up erroneously.
2016-01-29 17:24:49 -08:00
Andrew Schwartzmeyer
fd782abe99 Make dotnet-nightly workaround version-agnostic
If the `Debug/dnxcore50` path does not exist, don't worry about it.
2016-01-29 17:24:49 -08:00
Andrew Schwartzmeyer
188598e4ca Temporarily fix build scripts due to CLI bug
Latest versions of .NET CLI ignore --output and instead publish to a
long path inside of it. Until this is resolved properly, we can work
around it by copying to the expected location.

Revert this when CLI is fixed.
2016-01-28 18:38:57 -08:00
Andrew Schwartzmeyer
40946a68f3 Update build for OS X compatibility
Shared libraries are .dylib (not .so) so use a wildcard. Recent
dotnet-cli builds will guess the correct runtime when not supplied.
2016-01-15 11:55:09 -08:00
Andrew Schwartzmeyer
ec08d9f46c Move Pester test/Pester and push to GitHub 2016-01-14 16:17:50 -08:00
Andrew Schwartzmeyer
ae033a5846 Move monad-native to libpsl-native on GitHub 2016-01-14 10:32:02 -08:00
Andrew Schwartzmeyer
af1343472d Fix up Get-OmiInstance build and tests
Deploying module is a bit funky until dotnet-cli gives us more control
over which libraries to build and where. Theoretically we'll be able to
package System.Management.Automation and depend on the package instead,
so Commands.Omi can be its own project entirely.

Cleaned up the Commands.Omi project.json as it had some unnecessary
cruft from where it was copied. Also removed the AssemblyInfo as it does
not matter for a new module.

Moved the Get-OmiInstance Pester test to the project's test folder so it
doesn't run with our suite of tests (as it takes a dependency on OMI).
2015-12-23 12:29:08 -08:00
George Fleming
d0e2c22e54 Added Get-OmiInstance cmdlet
In a separate module importable into PowerShell.
2015-12-23 11:15:38 -08:00
Andrew Schwartzmeyer
b3a92e0ed3 Fix types and format files
Link to them instead so they don't get out of date. Explicitly fix the
incorrectly named file with an explicit link name. Also deploy the types
files with fixes to monad to fix shell output for various cmdlets.

Bumps monad submodule.
2015-12-22 17:03:14 -08:00
Andrew Schwartzmeyer
eabd6a41ba Deploy PowerShell.Utility modules
Odd that this caused only one test failure.
2015-12-21 13:41:30 -08:00
Andrew Schwartzmeyer
c9beaf314e Deploy Pester with symlink 2015-12-16 15:34:05 -08:00
Andrew Schwartzmeyer
fd0d529582 Rename publish.sh to build.sh for consistency 2015-12-16 13:48:20 -08:00
Andrew Schwartzmeyer
3876732d2e Add run script
- Deploy profile.ps1xml
- Remove deprecated build/nuke scripts
2015-12-14 10:30:39 -08:00
Andrew Schwartzmeyer
8994aea430 Fix up dirty build scripts 2015-11-23 19:43:46 -08:00
Andrew Schwartzmeyer
cc05381fe6 Add quickly written build scripts
These are from from correct.
2015-11-23 17:54:30 -08:00