未验证 提交 56b83726 编写于 作者: J Jose Perez Rodriguez 提交者: GitHub

Fix build issue when trying to run pack (#1942)

上级 7dc26413
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build %*"
setlocal
for %%x in (%*) do (
if "%%x"=="-pack" set _packArg=/p:BuildPackages=true
)
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build %* %_packArg%"
exit /b %ErrorLevel%
<Project Sdk="Microsoft.Build.Traversal">
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.Build.Traversal" />
<PropertyGroup>
<BuildRestore Condition="'$(BuildRestore)'==''">true</BuildRestore>
......@@ -36,4 +38,9 @@
<ProjectReference Condition="'$(BuildPackages)' == 'true'" Include="@(_ProjectsToPackage)" Targets="Pack" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.Build.Traversal" />
<!-- Undefine Pack target as this repo handles Pack during build based on a different property. -->
<Target Name="Pack" />
</Project>
......@@ -12,5 +12,13 @@ while [[ -h $source ]]; do
[[ $source != /* ]] && source="$scriptroot/$source"
done
for arg in "$@"
do
case "$arg" in
-pack) _packArg=/p:BuildPackages=true
;;
esac
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/common/build.sh" --build --restore $@
"$scriptroot/eng/common/build.sh" --build --restore $@ $_packArg
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册