diff --git a/BuildFiles/Building/ccnet.config b/BuildFiles/Building/ccnet.config index 8ff141b6..e110ae05 100644 --- a/BuildFiles/Building/ccnet.config +++ b/BuildFiles/Building/ccnet.config @@ -66,6 +66,7 @@ Remove weird output folder that shouldn't be there + @@ -84,14 +85,26 @@ false + + + + + bash + -c /usr/share/ccnet/bin/scripts/postbuild-fixes + /home/builder/swarmops/builds/internal + Prebuild fixes + + + bash -c "mv /home/builder/swarmops/sources/continuous/repo/Backend/etcinitd /home/builder/swarmops/builds/internal/backend" - Remove weird output folder that shouldn't be there + Copying /etc/init.d files for Backend Upstart + diff --git a/BuildFiles/Building/scripts/postbuild-fixes b/BuildFiles/Building/scripts/postbuild-fixes new file mode 100755 index 00000000..5bc9548b --- /dev/null +++ b/BuildFiles/Building/scripts/postbuild-fixes @@ -0,0 +1,51 @@ +#!/bin/bash + +# 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. + + +cd frontend + +# Rereference ASCX, ASPX files + +find . -iname '*.asp?.*.cs' -delete +find . -iname '*.asp?.cs' -delete + +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 .. + + + diff --git a/BuildFiles/Packaging/scripts/repackage-one b/BuildFiles/Packaging/scripts/repackage-one index c19f2207..9d727e19 100755 --- a/BuildFiles/Packaging/scripts/repackage-one +++ b/BuildFiles/Packaging/scripts/repackage-one @@ -110,8 +110,6 @@ if [ "$COPYFILES" == "yes" ]; then mv $DEPLOYDIR/$TARGETDIR/machineKey.config etc/swarmops/. sed -i 's/\"machineKey.config\"/\"..\/..\/..\/..\/etc\/swarmops\/machineKey.config\"/g' $DEPLOYDIR/$TARGETDIR/web.config echo "UNINITIALIZED" > etc/swarmops/symmetricKey.config - echo "Removing all source files..." - rm -r $DEPLOYDIR/$TARGETDIR/*.cs fi fi