From a1de029b641bd0f249514f493f978d87fdfbf3c2 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 1 Oct 2016 10:49:31 +0200 Subject: [PATCH 1/3] Another fix: Think I've solved the precompilation reference dupes --- BuildFiles/Building/ccnet.config | 15 ++++++++++++++- BuildFiles/Building/scripts/postbuild-fixes | 20 ++++++++++++++++++++ BuildFiles/Packaging/scripts/repackage-one | 2 -- 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100755 BuildFiles/Building/scripts/postbuild-fixes diff --git a/BuildFiles/Building/ccnet.config b/BuildFiles/Building/ccnet.config index 8ff141b6..abea5015 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 BuildFiles/Building/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..be04eb21 --- /dev/null +++ b/BuildFiles/Building/scripts/postbuild-fixes @@ -0,0 +1,20 @@ +#!/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 + +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;' {} \; + +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 From c0c9706d50139d276d27c225cf839574c9dad845 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 1 Oct 2016 11:17:42 +0200 Subject: [PATCH 2/3] Fix to post-build-script location --- BuildFiles/Building/ccnet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildFiles/Building/ccnet.config b/BuildFiles/Building/ccnet.config index abea5015..e110ae05 100644 --- a/BuildFiles/Building/ccnet.config +++ b/BuildFiles/Building/ccnet.config @@ -90,7 +90,7 @@ bash - -c BuildFiles/Building/scripts/postbuild-fixes + -c /usr/share/ccnet/bin/scripts/postbuild-fixes /home/builder/swarmops/builds/internal Prebuild fixes From 72f4653de12505d064cb3fb629d465ebbfd3ab55 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 1 Oct 2016 11:34:45 +0200 Subject: [PATCH 3/3] Some more postbuild fixes --- BuildFiles/Building/scripts/postbuild-fixes | 35 +++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) 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 ..