X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Frelease%2Fmakedocsrel;h=db14612fdcf6bce8d0e741507dc425d4eec405f1;hb=eb073f653c52e912bd18ce7e3fbcb8fd36ec0a81;hp=247eeb4343aa69af5238138434413bf775801ff9;hpb=dbfc70dbd85a7f884f2861a8751a51e54648f438;p=bacula%2Fbacula diff --git a/bacula/release/makedocsrel b/bacula/release/makedocsrel index 247eeb4343..db14612fdc 100755 --- a/bacula/release/makedocsrel +++ b/bacula/release/makedocsrel @@ -14,10 +14,13 @@ reltype=release tagbase=Release- base_dir=docs base_pkg=bacula-$base_dir -branch=$3 -if [ $# != 3 ] ; then - echo "Need $0 " - echo "e.g. $0 bacula-source docs-source master" +remote=$3 +branch=$4 +ver=$5 + +if [ $# != 5 ] ; then + echo "Need $0 " + echo "e.g. $0 bacula-source docs-source bee master 4.0.1" exit 1 fi cd $1 @@ -30,12 +33,13 @@ if [ $? -ne 0 ]; then echo "Directory: $1 does not exist" exit 1 fi +bcurrent=`git branch | awk '/*/ { print $2 }'` git checkout ${branch} if [ $? -ne 0 ]; then echo "Checkout of branch ${branch} in $1/bacula failed." exit 1 fi -git pull origin ${branch} +git pull ${remote} ${branch} bsrc=`pwd` cd ${cwd} cd $2 @@ -48,14 +52,14 @@ if [ $? -ne 0 ]; then echo "Directory: $2 does not exist" exit 1 fi +current=`git branch | awk '/*/ { print $2 }'` src=`pwd` git checkout ${branch} if [ $? -ne 0 ]; then echo "Checkout of branch ${branch} in ${src} failed." exit 1 fi -git pull origin ${branch} -ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h` +git pull ${remote} ${branch} fulltag=$tagbase$ver echo " " echo "Making $reltype for $base_pkg-$ver ..." @@ -65,7 +69,7 @@ read a git tag -d ${fulltag} echo "Creating new tag -- $fulltag" -git tag $fulltag -m "Create tag $fulltag" +git tag $fulltag if [ $? != 0 ] ; then echo " " echo "Non-zero return status from Git" @@ -85,7 +89,6 @@ if [ $? != 0 ] ; then exit 1 fi echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz" -git checkout master cd ${cwd} tar xfz $base_pkg-$ver.tar.gz cd $base_pkg-$ver/ @@ -93,8 +96,6 @@ mv docs $base_pkg-$ver cd $base_pkg-$ver ./configure --with-bacula=$bsrc make en -cd ${bsrc} -git checkout master cd ${cwd} echo "Tarring docs ..." tar cf $base_pkg-$ver.tar $base_pkg-$ver @@ -104,6 +105,15 @@ bzip2 $base_pkg-$ver.tar ./sign $base_pkg-$ver.tar.bz2 ls -l $base_pkg-$ver.tar.* -echo " " -echo "If everything is OK, don't forget to push $src tags to the repo" -echo " " +if [ a$push != ano ]; then + cd ${src} + git push ${remote} ${branch} +# git push ${remote} tag ${fulltag} + echo "Pushed ${remote}" +fi + +cd ${src} +git checkout ${current} + +cd ${bsrc} +git checkout ${bcurrent}