diff --git a/.gitignore b/.gitignore index 9cdda77f55..1cd5945326 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ bin/ obj/ debug/ +Packages/ +src/monad/ project.lock.json *-tests.xml diff --git a/README.md b/README.md index 677f393a4e..9f3ff8ca60 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Get PowerShell | Get **Binaries** | [Releases][] | [Artifacts][] | [Artifacts][] | [Releases][] | TBD | Building summary: `Start-PSBuild` from the module -`./PowerShellGitHubDev.psm1` (self-host on Linux / OS X) +`./build.psm1` (self-host on Linux / OS X) See [Linux releases](docs/installation/linux.md) and [Windows artifacts](docs/installation/windows.md) installation diff --git a/appveyor.yml b/appveyor.yml index 39d225f941..6413799cfe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,12 +18,12 @@ install: - ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent - git config --global url.git@github.com:.insteadOf https://github.com/ - git submodule update --init -- src/windows-build src/Modules/Pester - - ps: Import-Module .\PowerShellGitHubDev.psm1; Start-PSBootstrap + - ps: Import-Module .\build.psm1; Start-PSBootstrap build_script: - ps: | $ErrorActionPreference = 'Stop' - Import-Module .\PowerShellGitHubDev.psm1 + Import-Module .\build.psm1 Start-PSBuild -Publish Start-PSBuild -FullCLR diff --git a/PowerShellGitHubDev.psm1 b/build.psm1 similarity index 99% rename from PowerShellGitHubDev.psm1 rename to build.psm1 index 3f606f5428..05ffa606f2 100644 --- a/PowerShellGitHubDev.psm1 +++ b/build.psm1 @@ -821,7 +821,7 @@ function script:Start-NativeExecution([scriptblock]$sb) # point to the obsolete value if ($LASTEXITCODE -ne 0) { - throw "Execution failed with exit code $LASTEXITCODE" + throw "Execution of {$sb} failed with exit code $LASTEXITCODE" } } finally @@ -836,7 +836,7 @@ function script:Get-StronglyTypeCsFileForResx $body = @' //------------------------------------------------------------------------------ // -// This code was generated by a Start-ResGen funciton from PowerShellGitHubDev.psm1. +// This code was generated by a Start-ResGen funciton from build.psm1. // To add or remove a member, edit your .ResX file then rerun Start-ResGen. // // Changes to this file may cause incorrect behavior and will be lost if diff --git a/build.sh b/build.sh index 267a6966c9..aaab8c8484 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash if hash powershell 2>/dev/null; then - echo 'Continuing with `powershell -c Start-PSBuild`' - powershell -c "Import-Module ./PowerShellGitHubDev.psm1; Start-PSBuild" + echo 'Continuing with `powershell -noprofile -c Start-PSBuild`' + powershell -noprofile -c "Import-Module ./build.psm1; Start-PSBuild" else echo 'No `powershell`, see docs/building/linux.md or osx.md to build PowerShell!' fi diff --git a/docs/building/linux.md b/docs/building/linux.md index 4ecc1678b2..2cf505bb87 100644 --- a/docs/building/linux.md +++ b/docs/building/linux.md @@ -65,7 +65,7 @@ import our module, bootsrap the dependencies, and build! In PowerShell: ```powershell -Import-Module ./PowerShellGitHubDev.psm1 +Import-Module ./build.psm1 Start-PSBootstrap ``` @@ -98,7 +98,7 @@ uninstall prior any prior versions. Build using our module ====================== -We maintain a [PowerShell module](../../PowerShellGitHubDev.psm1) with +We maintain a [PowerShell module](../../build.psm1) with the function `Start-PSBuild` to build PowerShell. Since this is PowerShell code, it requires self-hosting. If you have followed the toolchain setup section above, you should have `powershell` installed. @@ -108,7 +108,7 @@ toolchain setup section above, you should have `powershell` installed. > in Bash; see [Build manually][#Build manually] below. ```powershell -Import-Module ./PowerShellGitHubDev.psm1 +Import-Module ./build.psm1 Start-PSBuild ``` diff --git a/docs/building/windows-core.md b/docs/building/windows-core.md index 41502f5a9b..7534debeda 100644 --- a/docs/building/windows-core.md +++ b/docs/building/windows-core.md @@ -29,7 +29,7 @@ build PowerShell. The `Start-PSBootstrap` function will automatically install it and add it to your path: ```powershell -Import-Module ./PowerShellGitHubDev.psm1 +Import-Module ./build.psm1 Start-PSBootstrap ``` @@ -62,11 +62,11 @@ CLI can cause odd failures when running. Please check your version. Build using our module ====================== -We maintain a [PowerShell module](../../PowerShellGitHubDev.psm1) with +We maintain a [PowerShell module](../../build.psm1) with the function `Start-PSBuild` to build PowerShell. ```powershell -Import-Module ./PowerShellGitHubDev.psm1 +Import-Module ./build.psm1 Start-PSBuild ``` diff --git a/docs/building/windows-full.md b/docs/building/windows-full.md index 00bc13094a..c6cb4ecacb 100644 --- a/docs/building/windows-full.md +++ b/docs/building/windows-full.md @@ -45,7 +45,7 @@ choco install cmake.portable Build using our module ====================== -Use `Start-PSBuild -FullCLR` from the `PowerShellGitHubDev.psm1` +Use `Start-PSBuild -FullCLR` from the `build.psm1` module. Because the `ConsoleHost` project (*not* the `Host` project) is a diff --git a/docs/workflow/mapping.md b/docs/workflow/mapping.md index 98bf4bd245..e2a9e59a94 100644 --- a/docs/workflow/mapping.md +++ b/docs/workflow/mapping.md @@ -15,7 +15,7 @@ Values are relative file paths in PowerShell/PowerShell GitHub project. We used to have a submodule at this path. If you replace this `src\monad` with path to the **admin** enlistment, you will get the mapping to source depot. -### PowerShellGitHubDev.psm1 +### build.psm1 Our dev module contains a number of functions to work that can be used to work with this mapping file. diff --git a/docs/workflow/resources.md b/docs/workflow/resources.md index b3c6b62289..874394de8e 100644 --- a/docs/workflow/resources.md +++ b/docs/workflow/resources.md @@ -25,7 +25,7 @@ If you just updated the string value, that's all you need to do: no need to re-g When you adding or removing string, `.cs` file need to be changed. -1. Run `Start-ResGen` function from `PowerShellGitHubDev.psm1` +1. Run `Start-ResGen` function from `build.psm1` 1. Make sure your code is building with newly generated resources (run `Start-PSBuild`). 1. Go to submodule (`cd src\windows-build`) and perform the [submodule commit dance](../git/committing.md). Follow working with [submodule rules](../../.github/CONTRIBUTING.md#submodules) diff --git a/mapping.json b/mapping.json index ebedb25cc7..378d5f05bc 100644 --- a/mapping.json +++ b/mapping.json @@ -1330,6 +1330,7 @@ "src/monad/monad/src/oneget/PowerShell.Module/Utility/HostApiExtensions.cs": "src/Microsoft.PackageManagement/PowerShell.Module/Utility/HostApiExtensions.cs", "src/monad/monad/src/oneget/PowerShell.Module/Utility/ProgressTracker.cs": "src/Microsoft.PackageManagement/PowerShell.Module/Utility/ProgressTracker.cs", "src/monad/monad/src/oneget/PowerShell.Module/Utility/ValidateListAttribute.cs": "src/Microsoft.PackageManagement/PowerShell.Module/Utility/ValidateListAttribute.cs", + "src/monad/monad/src/oneget/PowerShell.Module/Utility/WebProxy.cs": "src/Microsoft.PackageManagement/PowerShell.Module/Utility/WebProxy.cs", "src/monad/monad/src/oneget/PowerShell.Module/Constants.cs": "src/Microsoft.PackageManagement/PowerShell.Module/Constants.cs", "src/monad/monad/src/oneget/providers/inbox/archivers/Compression/Cab/CabEngine.cs": "src/Microsoft.PackageManagement/providers/inbox/archivers/Compression/Cab/CabEngine.cs", "src/monad/monad/src/oneget/providers/inbox/archivers/Compression/Cab/CabException.cs": "src/Microsoft.PackageManagement/providers/inbox/archivers/Compression/Cab/CabException.cs", @@ -1463,6 +1464,7 @@ "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Utility/FileUtility.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Utility/FileUtility.cs", "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Utility/PackageUtility.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Utility/PackageUtility.cs", "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Utility/PathUtility.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Utility/PathUtility.cs", + "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Utility/ProgressTracker.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Utility/ProgressTracker.cs", "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Utility/XmlUtility.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Utility/XmlUtility.cs", "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Version/DependencyVersion.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Version/DependencyVersion.cs", "src/monad/monad/src/oneget/providers/inbox/NugetLightProvider/Version/SemanticVersion.cs": "src/Microsoft.PackageManagement/providers/inbox/NugetLightProvider/Version/SemanticVersion.cs", diff --git a/test/fullclr/PowerShellGithubDev.Tests.ps1 b/test/fullclr/PowerShellGithubDev.Tests.ps1 index d4acbb9e84..c82ea8d64b 100644 --- a/test/fullclr/PowerShellGithubDev.Tests.ps1 +++ b/test/fullclr/PowerShellGithubDev.Tests.ps1 @@ -1,4 +1,4 @@ -Describe 'PowerShellGithubDev.psm1 and powershell.exe' { +Describe 'build.psm1 and powershell.exe' { Context '$env:DEVPATH assemblies loading' { It 'has $env:DEVPATH set' { $env:DEVPATH | Should Not Be $null @@ -29,4 +29,4 @@ Describe 'PowerShellGithubDev.psm1 and powershell.exe' { Join-Path $env:DEVPATH Microsoft.PowerShell.Security.dll) } } -} \ No newline at end of file +}