From 15f9abac0c3ed9b361f7232681cd4b9f2aca8e68 Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 3 Jun 2019 16:33:29 +1000 Subject: Better build script. Clean out last build the dumb way. Check for Mono version. --- .gitignore | 1 + BuildIt.sh | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 173ec34..cec33fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .project .settings +lastBuild #.gitignore *.csproj *.csproj.user diff --git a/BuildIt.sh b/BuildIt.sh index 76c54d7..66577a1 100755 --- a/BuildIt.sh +++ b/BuildIt.sh @@ -1,13 +1,25 @@ #!/bin/bash +# Delete *.pdb, *.dll, *,dll.*, *.csproj, *.csproj.*, */obj/ +find -newer lastBuild -name obj -type d -print | xargs /bin/rm -fr +find -newer lastBuild -name *.csproj -type f -print | xargs /bin/rm -f +find -newer lastBuild -name *.csproj.* -type f -print | xargs /bin/rm -f +find -newer lastBuild -name *.dll -type f -print | xargs /bin/rm -f +find -newer lastBuild -name *.dll.* -type f -print | xargs /bin/rm -f +find -newer lastBuild -name *.pdb -type f -print | xargs /bin/rm -f +sleep 1 +touch lastBuild + ./runprebuild.sh # Debian no longer provides nant. #./nant-color -# Use this for Mono 4. -xbuild /target:clean -xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5" - -# Use this for Mono 5. -#msbuild /p:Configuration=Release +if [ "5" == $(mono -V | head -n 1 | cut -d ' ' -f 5 | cut -d '.' -f 1) ]; then + # Use this for Mono 5. + msbuild /p:Configuration=Release +else + export XBUILD_COLORS=errors=brightred,warnings=yellow,events=blue + xbuild /target:clean + xbuild /p:TargetFrameworkVersion="v4.5"xbuild /p:TargetFrameworkVersion="v4.5" +fi -- cgit v1.1