diff --git a/scripts/commithook b/scripts/commithook new file mode 100755 index 000000000..09a2073a4 --- /dev/null +++ b/scripts/commithook @@ -0,0 +1,23 @@ +#!/bin/sh + +# Commit hook. Helps update bookmark. +# Put this file in your path. +# +# Edit file .hg/hgrc +# +# [hooks] +# commit = commithook + +DEVELOP_BRANCH="develop" +RELEASE_BRANCH="release" +CURRENT_BRANCH=$(hg branch) + +if [ $CURRENT_BRANCH = $DEVELOP_BRANCH ]; +then + hg bookmark -f master; +fi + +if [ $CURRENT_BRANCH = $RELEASE_BRANCH ]; +then + hg bookmark -f release; +fi diff --git a/scripts/outgoinghook b/scripts/outgoinghook new file mode 100644 index 000000000..c818b0bf7 --- /dev/null +++ b/scripts/outgoinghook @@ -0,0 +1,11 @@ +#!/bin/sh + +# Commit hook. Helps update bookmark. +# Put this file in your path. +# +# Edit file .hg/hgrc +# +# [hooks] +# outgoing = outgoinghook + +hg push -f git+ssh://git@github.com/dismine/Valentina.git