From 46304b8a714535a3973d927a955b9c97df3db882 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Sat, 16 Jan 2016 16:36:40 -0800 Subject: [PATCH] use build config to exclude xml doc rather than deleting them later --- build.sh | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index 7ee66471b..65b76f3d4 100755 --- a/build.sh +++ b/build.sh @@ -7,6 +7,7 @@ outputFolderOsxApp='./_output_osx_app' testPackageFolder='./_tests/' testSearchPattern='*.Test/bin/x86/Release' sourceFolder='./src' +slnFile = '$sourceFolder/NzbDrone.sln' updateFolder=$outputFolder/NzbDrone.Update updateFolderMono=$outputFolderMono/NzbDrone.Update @@ -27,14 +28,6 @@ CleanFolder() local path=$1 local keepConfigFiles=$2 - echo "Removing XMLDoc files" - local xmlfiles=( $(find $path -name "*.xml") ) - for filename in "${xmlfiles[@]}" - do - if [ -e ${filename%.xml}.dll ] || [ -e ${filename%.xml}.exe ] ; then - rm $filename - fi - done find $path -name "*.transform" -exec rm "{}" \; @@ -55,11 +48,6 @@ CleanFolder() echo "Removing dylib files" find $path -name "*.dylib" -exec rm "{}" \; - if [ -d $path/NuGet ] ; then - echo "Removing NuGet" - rm -rf $path/NuGet - fi - echo "Removing Empty folders" find $path -depth -empty -type d -exec rm -r "{}" \; } @@ -76,17 +64,17 @@ AddJsonNet() BuildWithMSBuild() { export PATH=$msBuild:$PATH - CheckExitCode MSBuild.exe $sourceFolder/NzbDrone.sln //t:Clean //m - $nuget restore $sourceFolder/NzbDrone.sln - CheckExitCode MSBuild.exe $sourceFolder/NzbDrone.sln //p:Configuration=Release //p:Platform=x86 //t:Build //m + CheckExitCode MSBuild.exe $slnFile //t:Clean //m + $nuget restore $slnFile + CheckExitCode MSBuild.exe $slnFile //p:Configuration=Release //p:Platform=x86 //t:Build //m //p:AllowedReferenceRelatedFileExtensions=.pdb } BuildWithXbuild() { export MONO_IOMAP=case - CheckExitCode xbuild /t:Clean $sourceFolder/NzbDrone.sln - mono $nuget restore $sourceFolder/NzbDrone.sln - CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build $sourceFolder/NzbDrone.sln + CheckExitCode xbuild /t:Clean $slnFile + mono $nuget restore $slnFile + CheckExitCode xbuild /p:Configuration=Release /p:Platform=x86 /t:Build /m /p:AllowedReferenceRelatedFileExtensions=.pdb $slnFile } Build()