Permalink
Browse files

Fix pull/push workflow

  • Loading branch information...
1 parent 0c5253e commit e0429e7883625384a831e75f3f82dafa186791cf @cbonte committed May 26, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 tools/generate-docs.sh
View
@@ -39,7 +39,7 @@ then
fi
cd $WORK_DIR/haproxy/1.4 || exit 1
OLD_MD5=$(md5sum doc/configuration.txt)
- git checkout master && git pull -v origin master
+ git checkout master && git pull -v
haproxy14_git_version=$(git describe --tags --match 'v*')
haproxy14_git_version=${haproxy14_git_version%-g*}
NEW_MD5=$(md5sum doc/configuration.txt)
@@ -56,7 +56,7 @@ then
fi
cd $WORK_DIR/haproxy/1.5 || exit 1
OLD_MD5=$(md5sum doc/configuration.txt)
- git checkout master && git pull -v origin master
+ git checkout master && git pull -v
haproxy15_git_version=$(git describe --tags --match 'v*')
haproxy15_git_version=${haproxy15_git_version%-g*}
NEW_MD5=$(md5sum doc/configuration.txt)
@@ -73,7 +73,7 @@ then
fi
cd $WORK_DIR/haproxy-dconv/master || exit 1
OLD_MD5="$(git log -1 | md5sum) $(git describe --tags)"
- git checkout master && git pull -v origin master
+ git checkout master && git pull -v
version=$(git describe --tags)
version=${version%-g*}
NEW_MD5="$(git log -1 | md5sum) $(git describe --tags)"
@@ -89,7 +89,7 @@ then
git clone -v -b gh-pages git@github.com:cbonte/haproxy-dconv.git $WORK_DIR/haproxy-dconv/gh-pages || exit 1
fi
cd $WORK_DIR/haproxy-dconv/gh-pages || exit 1
- git checkout gh-pages && git pull -v origin gh-pages
+ git checkout gh-pages && git pull -v
cd $PROJECT_HOME
if [ "$force" == 1 -o "$updated" == "1" -o "$updated14" == "1" ];
@@ -141,8 +141,11 @@ cd $WORK_DIR/haproxy-dconv/gh-pages || exit 1
then
git commit -m "Updating HAProxy documentation ${haproxy15_git_version} generated by haproxy-dconv $version" configuration-1.5.html && push=1
fi &&
- if [ "$push" == "1" -o "$(git status -s)" != "" ];
+ if [ "$(git status -s)" != "" ];
+ then
+ git commit -a -m "Generated documentations based on haproxy-dconv $version" && push=1
+ fi &&
+ if [ "$push" == "1" ];
then
- git commit -a -m "Generated documentations based on haproxy-dconv $version" &&
git push origin gh-pages
fi

0 comments on commit e0429e7

Please sign in to comment.