Tim Starling has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/52765


Change subject: Build script
......................................................................

Build script

Change-Id: I3591e76941f439de1b7ea9e6b4551f9f2a742776
---
A wmf-build
1 file changed, 63 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/luasandbox 
refs/changes/65/52765/1

diff --git a/wmf-build b/wmf-build
new file mode 100755
index 0000000..d9a96b9
--- /dev/null
+++ b/wmf-build
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+DISTRO_VERSION=precise
+
+echo '
+       set -e
+       BUILDDIR="`mktemp -d --tmpdir=/mnt/tmp`"
+       cd /mnt/src/luasandbox
+       git pull
+       git archive --prefix=luasandbox/ master | tar -xC "$BUILDDIR"
+       cd "$BUILDDIR"
+       dpkg-source -b luasandbox
+       /pb/build-'$DISTRO_VERSION' *.dsc
+       perl -ne '\''if (/^Version: (\S*)/) {print "$1\n";}'\'' *.dsc > 
/mnt/src/luasandbox-version
+' | ssh php-packaging.pmtpa.wmflabs sudo bash
+
+if [ $? -ne 0 ]; then
+       echo Build failed
+       exit 1
+fi
+
+VERSION=`ssh php-packaging.pmtpa.wmflabs cat /mnt/src/luasandbox-version 
2>/dev/null`
+
+ssh php-packaging.pmtpa.wmflabs "
+       cd /pb/result/$DISTRO_VERSION
+       tar -c php-luasandbox_$VERSION*
+" 2>/dev/null | tar -x 
+
+echo "OK to upload version $VERSION?"
+select ok in yes no ; do
+       if [ "$ok" == no ]; then
+               exit 1
+       fi
+       if [ "$ok" == yes ]; then
+               break
+       fi
+done
+
+# ~/.dupload.conf could contain:
+#
+# package config;
+# 
+# $default_host = "wikimedia";
+# 
+# $cfg{'wikimedia'} = {
+#      fqdn => 'brewster.wikimedia.org',
+#      method => 'rsync',
+#      login => 'root',
+#      incoming => '/srv/wikimedia/incoming',
+# };
+# 
+# 1;
+
+if ! dupload php-luasandbox_$VERSION*.changes ; then
+       echo Upload failed
+       exit 1
+fi
+
+ssh r...@brewster.wikimedia.org "
+       cd /srv/wikimedia/incoming
+       reprepro include $DISTRO_VERSION-wikimedia 
php-luasandbox_$VERSION*.changes
+"
+

-- 
To view, visit https://gerrit.wikimedia.org/r/52765
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3591e76941f439de1b7ea9e6b4551f9f2a742776
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/php/luasandbox
Gerrit-Branch: master
Gerrit-Owner: Tim Starling <tstarl...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to