Skip to content

Commit

Permalink
Only build if we haven't built before. Trying to reduce bandwidth usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaihendry committed Jun 13, 2013
1 parent f0cd2fa commit 73d8431
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
*.txt
*.iso
3 changes: 3 additions & 0 deletions .htaccess
@@ -0,0 +1,3 @@
Redirect /latest.iso /webc-4b74283.iso
Redirect /latest.txt /webc-4b74283.txt
IndexIgnore webc-build.sh
11 changes: 10 additions & 1 deletion HEADER.html → README.html
Expand Up @@ -6,7 +6,7 @@
</style>
</head>
<body>
<h1>Webconverger daily builds for bug hunters</h1>
<h1>Webconverger daily builds</h1>

<p>Scared? Please see the <a
href="http://download.webconverger.com/">Webconverger download site</a> for
Expand All @@ -28,5 +28,14 @@ <h1>Webconverger daily builds for bug hunters</h1>

<p><a href="https://github.com/Webconverger/dailybuild">Source code on github of this build tool</a></p>

<h3>Cronjob</h3>

<p>As root:</p>

<pre>
@daily /srv/www/build.webconverger.org/webc-build.sh
@daily find /srv/www/build.webconverger.org/ -mindepth 1 -maxdepth 1 -mtime +4 \( -name "*.txt" -o -name "*.iso" \) -exec rm -vrf {} \;
</pre>

</body>
</html>
12 changes: 0 additions & 12 deletions deliver.sh

This file was deleted.

18 changes: 13 additions & 5 deletions webc-build.sh
@@ -1,7 +1,15 @@
#!/bin/bash -ex
#!/bin/bash -e

OUTPUT="/srv/www/build.webconverger.org/output"
#DEBUG=true
OUTPUT="/srv/www/build.webconverger.org"

sha=$(git ls-remote git://github.com/Webconverger/webc.git refs/heads/master)
shortsha=${sha:0:7}

if ls $OUTPUT/webc-$shortsha.*
then
echo Already built!
exit
fi

BUILDID=webconverger.$(date --rfc-3339=date)

Expand Down Expand Up @@ -34,7 +42,7 @@ test "$DEBUG" && echo TEMPDIR $TEMPDIR
mailerror () {
echo BUILD FAILED at $BUILDID
echo "$LOG" |
mail -a 'From: hendry@webconverger.com' -s "failed" kai.hendry@gmail.com
mail -a 'From: hendry@webconverger.com' -s "uk failed" kai.hendry@gmail.com
exit 1
}

Expand Down Expand Up @@ -66,6 +74,6 @@ cd Debian-Live-config/webconverger
git describe --always

# http://webconverger.org/upgrade/
make deploy
make deploy OUTPUT=$OUTPUT

chown -R www-data:www-data $OUTPUT

0 comments on commit 73d8431

Please sign in to comment.