Straw-man mechanism for updating Git properly with builds
authorGreg Price <price@mit.edu>
Thu, 21 Mar 2013 07:58:11 +0000 (03:58 -0400)
committerGreg Price <price@mit.edu>
Thu, 21 Mar 2013 07:58:11 +0000 (03:58 -0400)
debian/changelog
git-hooks/sub/update

index 1508207..d12ce98 100644 (file)
@@ -1,3 +1,9 @@
+invirt-dev (0.1.23) precise; urgency=low
+
+  * Let the dev invirtibuilder push its updates to Git.
+
+ -- Greg Price <price@mit.edu>  Thu, 21 Mar 2013 03:56:44 -0400
+
 invirt-dev (0.1.22) precise; urgency=low
 
   * Fixed formatting in the README
index 7bbac3d..5f3de97 100755 (executable)
@@ -18,6 +18,24 @@ if [ -z "$ref" ] || [ -z "$oldrev" ] || [ -z "$newrev" ]; then
         exit 1
 fi
 
+# --- Allow the dev invirtibuilder to update with build results
+
+echo SSH_GSSAPI_NAME: "$SSH_GSSAPI_NAME"  # This is filled in by sshd (see third/openssh.git)
+
+if grep -qxF "$SSH_GSSAPI_NAME" <<EOF
+daemon/xvm-dev.mit.edu@ATHENA.MIT.EDU
+price@ATHENA.MIT.EDU
+EOF
+then
+    case "$ref" in
+        # The dev invirtibuilder can push "dev"-looking branches, and tags.
+        refs/heads/*dev|refs/tags/*)
+            exit 0;;
+        *)
+            exit 1;;
+    esac
+fi
+
 # --- Disallow pushing to the branches for pockets
 
 pocket_to_git() {