PPA build script source attached
Posted: 15 Sep 2016, 22:08
Hello all - someone requested the PPA autobuild scripts over the summer. The process is now a hack, it used to be so much easier and automatic, but changes to the system made me do one with cron jobs.
Launchpad is supposed to automatically pull from a repo, then build based on that pull. However, launchpad can't handle submodules:
https://bugs.launchpad.net/bzr-git/+bug/402814
so I get around it by having a cron job pull from github then push to launchpad. Once on launchpad, normal build recipes work.
Here's our build recipe:
https://code.launchpad.net/~openmw/+recipe/openmw-daily
repository for source code:
https://code.launchpad.net/~openmw/openmw/trunk
For the packaging info, I take bret's packaging directly from debian by the same process and put it on to launchpad (at https://code.launchpad.net/~openmw/open ... packaging2) so the launchpad build can work:
Launchpad can pull from debian directly with no problem, there is just a longer delay than if I do it manually via cron.
I restarted my server, so it should be building again -- but if someone wants to make it more full proof (or build it in to travis/jenkins/some other CI?), that could work too!
Launchpad is supposed to automatically pull from a repo, then build based on that pull. However, launchpad can't handle submodules:
https://bugs.launchpad.net/bzr-git/+bug/402814
so I get around it by having a cron job pull from github then push to launchpad. Once on launchpad, normal build recipes work.
Code: Select all
#!/bin/bash
date
source $HOME/.keychain/${HOSTNAME}-sh
bzr launchpad-login LOGIN
bzr whoami "name <[email protected]>"
cd /home/labuser/openmw/openmw
git pull origin master
git submodule update --init --recursive
HASH=$(git log --pretty=format:'%h' -n 1)
bzr stat -S|grep ^?|sed 's/^? //'| while read LINE; do bzr add "$LINE"; done
bzr ci -m "Cron update. Git hash: $HASH"
bzr push
https://code.launchpad.net/~openmw/+recipe/openmw-daily
repository for source code:
https://code.launchpad.net/~openmw/openmw/trunk
For the packaging info, I take bret's packaging directly from debian by the same process and put it on to launchpad (at https://code.launchpad.net/~openmw/open ... packaging2) so the launchpad build can work:
Code: Select all
#!/bin/bash
date
source $HOME/.keychain/${HOSTNAME}-sh
bzr launchpad-login LOGIN
bzr whoami "name <[email protected]>"
cd /home/labuser/openmw.packaging/openmw
git pull
git submodule update --init --recursive
HASH=$(git log --pretty=format:'%h' -n 1)
bzr stat -S|grep ^?|sed 's/^? //'| while read LINE; do bzr add "$LINE"; done
bzr ci -m "Cron update. Git hash: $HASH"
bzr push
I restarted my server, so it should be building again -- but if someone wants to make it more full proof (or build it in to travis/jenkins/some other CI?), that could work too!