Mercurial hooks.
--HG-- branch : develop
This commit is contained in:
parent
d134e8b367
commit
b029cb8af4
23
scripts/commithook
Executable file
23
scripts/commithook
Executable file
|
@ -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
|
11
scripts/outgoinghook
Normal file
11
scripts/outgoinghook
Normal file
|
@ -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
|
Loading…
Reference in New Issue
Block a user