diff --git a/BuildFiles/Building/scripts/postbuild-fixes b/BuildFiles/Building/scripts/postbuild-fixes index be04eb21..5bc9548b 100755 --- a/BuildFiles/Building/scripts/postbuild-fixes +++ b/BuildFiles/Building/scripts/postbuild-fixes @@ -2,11 +2,19 @@ # This file is to be run in the build directory, after publication of the finished build there. -# FRONTEND FIXES -# Remove all source files and re-reference aspx, ascx files to refer to the compiled Swarmops.Frontend assembly instead. +# =================================================== +# FRONTEND FIXES +# =================================================== + +# Remove all source files and re-reference aspx, ascx +# files to refer to the compiled Swarmops.Frontend +# assembly instead. + cd frontend +# Rereference ASCX, ASPX files + find . -iname '*.asp?.*.cs' -delete find . -iname '*.asp?.cs' -delete @@ -14,6 +22,29 @@ find . -iname '*.as?x' -exec perl -pi -e 's/[Cc]ode[Bb]ehind=\".*?\"//g;' {} \; find . -iname '*.as?x' -exec perl -pi -e 's/[Cc]ode[Ff]ile=\".*?\"//g;' {} \; find . -iname '*.as?x' -exec perl -pi -e 's/[Ii]nherits=\"(.*?)\"/Inherits="$1, Swarmops.Frontend"/g;' {} \; + +# Rereference Master(s) + +find . -iname '*.master.*.cs' -delete +find . -iname '*.master.cs' -delete + +find . -iname '*.master' -exec perl -pi -e 's/[Cc]ode[Bb]ehind=\".*?\"//g;' {} \; +find . -iname '*.master' -exec perl -pi -e 's/[Cc]ode[Ff]ile=\".*?\"//g;' {} \; +find . -iname '*.master' -exec perl -pi -e 's/[Ii]nherits=\"(.*?)\"/Inherits="$1, Swarmops.Frontend"/g;' {} \; + + +# Remove template configs, project files, and other +# build artifacts from deployment package + +rm -rf obj + +find . -iname '*.csproj' -delete + +rm web.Debug.config +rm web.Release.config +rm packages.condig + + cd ..