3 git rev-list HEAD |
sort > config.git-hash
4 LOCALVER
=`wc -l config.git-hash | awk '{print $1}'`
5 if [ $LOCALVER \
> 1 ] ; then
6 VER
=`git rev-list origin/master | sort | join config.git-hash - | wc -l | awk '{print $1}'`
7 if [ $VER != $LOCALVER ] ; then
8 VER
="$VER+$(($LOCALVER-$VER))"
9 elif git status |
grep -q "modified:" ; then
12 VER
="$VER.$(git rev-list HEAD -n 1 | head -c 7)"
17 sed -i -e "s:\"\([0-9]*\.[0-9]*\.[0-9]*\).*\".*$:\"\1\.$VER\":g" \
18 -e "s:\"nginx/\":\"nginx-catap/\":g" \
20 sed -i -e "s:'\([0-9]*\.[0-9]*\.[0-9]*\).*'.*$:\'\1\.$VER\';:g" \
21 src
/http
/modules
/perl
/nginx.pm