From b5c91de7f4302add06e0b13fa255839fbef1bff0 Mon Sep 17 00:00:00 2001 From: Jianyun Tao Date: Mon, 18 Jul 2016 11:31:20 -0700 Subject: [PATCH] Updated linux.md --- docs/FAQ.md | 20 +++++++++++++++++++- docs/building/linux.md | 21 +++++---------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index cf783cb14..e9abe54cb 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -43,13 +43,31 @@ more information. [error]: https://blogs.msdn.microsoft.com/kebab/2013/06/09/an-introduction-to-error-handling-in-powershell/ -I just pulled master, why did my build fail? +Why did my build fail? ============================================ +There are few common issues with the build. +The easiest way to resolve most issues with the build is to run `Start-PSBuild -Clean`. + +### Dependency changed + If package dependencies were changed in any `project.json`, you need to manually run `dotnet restore` to update your local dependency graphs. `Start-PSBuild -Restore` can automatically do this. +### Resource changed + +`Start-PSBuild` automatically calls `Start-ResGen` on the very first run. +On subsequent runs, you may need to explicitly use `Start-PSBuild -ResGen` command. + +Try it, when you see compilation error about *strings. + +[More details](workflow/resources.md) about resource. + +### TypeGen + +Similar to `-ResGen` parameter, there is `-TypeGen` parameter that trigger re-generation of type catalog. + Why did `Start-PSBuild` tell me to update `dotnet`? =================================================== diff --git a/docs/building/linux.md b/docs/building/linux.md index fddc8844f..2e51afb8e 100644 --- a/docs/building/linux.md +++ b/docs/building/linux.md @@ -15,11 +15,12 @@ Git Setup --------- Using Git requires it to be setup correctly; refer to the +[Working With the PowerShell Repository](../git/powershell-repository-101.md), [README](../../README.md) and [Contributing Guidelines](../../.github/CONTRIBUTING.md). -This guide assumes that you have recursively cloned the PowerShell -repository and `cd`ed into it. +**This guide assumes that you have recursively cloned the PowerShell +repository and `cd`ed into it.** Toolchain Setup --------------- @@ -54,13 +55,6 @@ The `./tools/download.sh` script will also install the PowerShell package. In Bash: -```sh -git clone https://github.com/PowerShell/powerShell.git -``` -If git prompts you for your password, you need to enter your access token. Click [GitHub Help][help] for how to get access token. - -[help]:https://help.github.com/articles/creating-an-access-token-for-command-line-use/ - ```sh GITHUB_TOKEN= ./tools/download.sh @@ -72,11 +66,8 @@ You should now be in a `powershell` console host that is installed separately from any development copy you're about to build. Just import our module, bootstrap the dependencies, and build! - In PowerShell: -Change your directory to the one that you just cloned, for example, ``./src/PowerShell`. - ```powershell Import-Module ./build.psm1 Start-PSBootstrap @@ -125,17 +116,15 @@ toolchain setup section above, you should have `powershell` installed. ```powershell Import-Module ./build.psm1 -git submodule init -git submodule update Start-PSBuild ``` - Congratulations! If everything went right, PowerShell is now built. The `Start-PSBuild` script will output the location of the executable: `./src/powershell/bin/Linux/netcoreapp1.0/ubuntu.14.04-x64/powershell`. -You should now be running the `powershell` that is what you just built if your run the above executable. You can run our cross-platform Pester tests with `Start-PSPester`, and +You should now be running the `powershell` that is what you just built if your run the above executable. +You can run our cross-platform Pester tests with `Start-PSPester`, and our xUnit tests with `Start-PSxUnit`. Build manually