Make building easier on Windows by setting PowerShell execution policy (attempt 2) (#6755)

* Make building easier on Windows by setting PowerShell execution policy

* Update build.cake to reference cmd as well as ps1

* remove . on instructions
This commit is contained in:
Eilon Lipton 2019-07-02 13:36:22 -07:00 коммит произвёл Shane Neuville
Родитель e15ae8ca86
Коммит cd699094ba
2 изменённых файлов: 11 добавлений и 2 удалений

Просмотреть файл

@ -6,11 +6,14 @@
// examples
/*
Windows CMD:
build.cmd -Target NugetPack
build.cmd -Target NugetPack -ScriptArgs '-packageVersion="9.9.9-custom"'
PowerShell:
./build.ps1 -Target NugetPack
./build.ps1 -Target NugetPack -ScriptArgs '-packageVersion="9.9.9-custom"'
*/
//////////////////////////////////////////////////////////////////////
// ADDINS

6
build.cmd Normal file
Просмотреть файл

@ -0,0 +1,6 @@
@ECHO OFF
SETLOCAL
PowerShell -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0build.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }"
SET exit_code=%ERRORLEVEL%
ECHO build.cmd completed
EXIT /b %exit_code%