PowerShell/build.sh
Christopher Nelson 7388ec960f build: Update build.sh to run fully manual build (#2832)
* build: Update build.sh to run fully manual build
* add ubuntu-16.10-x64 to the list of architectures to build for.w
2016-12-28 13:59:51 -08:00

32 lines
822 B
Bash
Executable file

#!/usr/bin/env bash
set -e
if hash powershell 2>/dev/null; then
echo 'Continuing with `powershell -noprofile -c Start-PSBuild`'
powershell -noprofile -c "Import-Module ./build.psm1; Start-PSBuild"
else
echo 'Continuing with full manual build'
dotnet restore
pushd src/ResGen
dotnet run
popd
pushd src/TypeCatalogParser
dotnet run
popd
pushd src/TypeCatalogGen
dotnet run ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CorePsTypeCatalog.cs powershell.inc
popd
pushd src/libpsl-native
cmake -DCMAKE_BUILD_TYPE=Debug .
make -j
make test
popd
dotnet publish --configuration Linux ./src/powershell-unix/ --output bin
echo 'You can run powershell from bin/, but some modules that are normally added by the Restore-PSModule step will not be available.'
fi