|
|
|
@@ -38,6 +38,9 @@ else
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
PACKAGENAME=$PACKAGE$CONTROLSUFFIX
|
|
|
|
|
BUILDIDSOURCE="BuildIdentity.txt"
|
|
|
|
|
|
|
|
|
|
cp ../lastbuild/frontend/BuildIdentity.txt ./BuildIdentity.txt
|
|
|
|
|
|
|
|
|
|
# Delete flag that indicates a new drop is available
|
|
|
|
|
#rm /home/packaging/lastbuild/BuildDropped.txt
|
|
|
|
@@ -66,7 +69,8 @@ fi
|
|
|
|
|
|
|
|
|
|
echo "Copying template files into repo..."
|
|
|
|
|
if [ "$INCLUDEDB" == "yes" ]; then
|
|
|
|
|
cp ../templates/database.config.template opt/swarmops/$TARGETDIR/database.config
|
|
|
|
|
mkdir -p /etc/swarmops
|
|
|
|
|
cp ../templates/database.config.template etc/swarmops/database.config
|
|
|
|
|
fi
|
|
|
|
|
cp ../templates/control-$PACKAGENAME.template DEBIAN/control
|
|
|
|
|
cp ../templates/conffiles-$PACKAGE.template DEBIAN/conffiles
|
|
|
|
@@ -74,6 +78,7 @@ cp ../templates/conffiles-$PACKAGE.template DEBIAN/conffiles
|
|
|
|
|
if [ -e "../templates/prerm-$PACKAGE.template" ]; then
|
|
|
|
|
echo "Adding $PACKAGE prerm script..."
|
|
|
|
|
cp ../templates/prerm-$PACKAGE.template DEBIAN/prerm
|
|
|
|
|
chmod +x DEBIAN/prerm
|
|
|
|
|
else
|
|
|
|
|
if [ -e "DEBIAN/prerm" ]; then
|
|
|
|
|
echo "Deleting old prerm script..."
|
|
|
|
@@ -84,6 +89,7 @@ fi
|
|
|
|
|
if [ -e "../templates/postinst-$PACKAGE.template" ]; then
|
|
|
|
|
echo "Adding $PACKAGE postinst script..."
|
|
|
|
|
cp ../templates/postinst-$PACKAGE.template DEBIAN/postinst
|
|
|
|
|
chmod +x DEBIAN/postinst
|
|
|
|
|
else
|
|
|
|
|
if [ -e "DEBIAN/postinst" ]; then
|
|
|
|
|
echo "Deleting old postinst script..."
|
|
|
|
@@ -91,8 +97,8 @@ else
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Setting build number ($(cat ../../lastbuild/frontend/BuildIdentity.txt | tr -d ' \r'))..."
|
|
|
|
|
sed -i "s/--BuildNumber--/$(cat ../../lastbuild/frontend/BuildIdentity.txt | tr -d ' \r')/" DEBIAN/control
|
|
|
|
|
echo "Setting build number ($(cat ../$BUILDIDSOURCE | tr -d ' \r'))..."
|
|
|
|
|
sed -i "s/--BuildNumber--/$(cat ../$BUILDIDSOURCE | tr -d ' \r')/" DEBIAN/control
|
|
|
|
|
|
|
|
|
|
# Calculating new checksums
|
|
|
|
|
echo "Creating MD5 checksum file..."
|
|
|
|
@@ -110,9 +116,10 @@ cp swarmops-$PACKAGENAME-latest.deb /home/prod/Smallwebs/Activizr-repo
|
|
|
|
|
echo "Updating repositories..."
|
|
|
|
|
scripts/update-repos swarmops-$PACKAGENAME-latest.deb
|
|
|
|
|
|
|
|
|
|
#echo "Notifying developers that new build has deployed for test..."
|
|
|
|
|
#echo "Swarmops $PACKAGENAME build $(cat debian-stable/opt/swarmops/frontend/BuildIdentity.txt | tr -d ' \r') has been deployed as daily build." > deploymsg.txt
|
|
|
|
|
#echo "Test it at http://dev.swarmops.com/ as usual." >> deploymsg.txt
|
|
|
|
|
#mail -s "Swarmops $PACKAGENAME $(cat debian-stable/opt/swarmops/frontend/BuildIdentity.txt)deployed as daily" "swarmops-builds@falkvinge.net" < deploymsg.txt
|
|
|
|
|
rm deploymsg.txt
|
|
|
|
|
echo "Notifying developers that new build has deployed for test..."
|
|
|
|
|
echo "Swarmops $PACKAGENAME build $(cat $BUILDIDSOURCE | tr -d ' \r') has been deployed as daily build." > deploymsg.txt
|
|
|
|
|
echo "Test it at http://dev.swarmops.com/ as usual." >> deploymsg.txt
|
|
|
|
|
mail -s "Swarmops $PACKAGENAME $(cat $BUILDIDSOURCE) deployed as daily" "swarmops-builds@falkvinge.net" < deploymsg.txt
|
|
|
|
|
|
|
|
|
|
rm deploymsg.txt
|
|
|
|
|
rm $BUILDIDSOURCE
|
|
|
|
|