Permalink
Browse files

Added script to publish to bitbucket and github.

  • Loading branch information...
1 parent 1957b8a commit c2d413a16ddfcfce6c51e4c5c9af0531a6ade083 @abudden committed Apr 10, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 dist/vcs_publish.sh
View
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+BBUSER=abudden
+BBPROJ=easycolour
+GHUSER=abudden
+GHPROJ=EasyColour
+
+BITBUCKET=ssh://hg@bitbucket.org/${BBUSER}/${BBPROJ}
+GITHUB=git+ssh://git@github.com:${GHUSER}/${GHPROJ}.git
+
+# Create a bookmark so that github is properly updated
+hg bookmark master -f
+
+hg push $BITBUCKET
+# Only fail on error, not on "no changes to push"
+if [ $? -gt 1 ]
+then
+ exit 255
+fi
+
+hg push $GITHUB
+# Only fail on error, not on "no changes to push"
+if [ $? -gt 1 ]
+then
+ exit 255
+fi

0 comments on commit c2d413a

Please sign in to comment.