未验证 提交 251107bc 编写于 作者: J Jared Parsons 提交者: GitHub

Merge pull request #26155 from jaredpar/fix-pack

Build NuPkg on Unix
......@@ -15,6 +15,8 @@ usage()
echo " --release Build Release"
echo " --restore Restore projects required to build"
echo " --build Build all projects"
echo " --pack Build prerelease nuget packages"
echo " --packall Build all nuget packages"
echo " --test Run unit tests"
echo " --mono Run unit tests with mono"
echo " --build-bootstrap Build the bootstrap compilers"
......@@ -32,6 +34,8 @@ build_configuration=Debug
restore=false
build=false
test_=false
pack=false
pack_all=false
use_mono=false
build_bootstrap=false
use_bootstrap=false
......@@ -93,6 +97,13 @@ do
--stop-vbcscompiler)
stop_vbcscompiler=true
;;
--pack)
pack=true
;;
--packall)
pack_all=true
pack=true
;;
*)
echo "$1"
usage
......@@ -109,6 +120,32 @@ mkdir -p ${binaries_path}
mkdir -p ${config_path}
mkdir -p ${logs_path}
function pack_all_kind() {
pushd "${root_path}/src/NuGet"
echo Packing $1
local nupkg_path="${config_path}/NuGet/PreRelease"
local nuspec_files=("Microsoft.CodeAnalysis.CSharp.nuspec" "Microsoft.CodeAnalysis.Compilers.nuspec" "Microsoft.CodeAnalysis.VisualBasic.nuspec" "Microsoft.CodeAnalysis.Common.nuspec" "Microsoft.NETCore.Compilers.nuspec")
mkdir -p ${nupkg_path}
for i in "${nuspec_files[@]}"
do
dotnet pack -nologo --no-build NuGetProjectPackUtil.csproj -p:NuSpecFile=$i -p:NuGetPackageKind=$1 -p:NuspecBasePath=${binaries_path}/Debug -o ${nupkg_path}
done
popd
}
function pack_all() {
pack_all_kind PreRelease
if [[ "$pack_all" = true ]]
then
pack_all_kind Release
pack_all_kind PerBuildPreRelease
fi
}
if [[ "$build_in_docker" = true ]]
then
echo "Docker exec: $args"
......@@ -167,6 +204,11 @@ then
dotnet build "${root_path}"/Compilers.sln ${build_args} "/bl:${binaries_path}/Build.binlog"
fi
if [[ "${pack}" == true ]]
then
pack_all
fi
if [[ "${stop_vbcscompiler}" == true ]]
then
if [[ "${use_bootstrap}" == true ]]
......
......@@ -24,4 +24,4 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
echo "Building this commit:"
git show --no-patch --pretty=raw HEAD
"${root_path}"/build.sh --restore --bootstrap --build --stop-vbcscompiler --test "$@"
"${root_path}"/build.sh --restore --bootstrap --build --packall --stop-vbcscompiler --test "$@"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册