4 # This script is used to make a Bacula docs release
6 # It writes in the current directory, so we recommend that you
7 # do not run it in the Bacula source or Git directory, but
8 # in a special release directory.
10 # Commit all changes, export the release, make a release tar.
16 base_pkg=bacula-$base_dir
19 echo "Need $0 <bacula-source-directory> <docs-source-directory> <branch>"
20 echo "e.g. $0 bacula-source docs-source master"
25 echo "Directory: $1 does not exist"
30 echo "Directory: $1 does not exist"
33 git checkout ${branch}
35 echo "Checkout of branch ${branch} in $1/bacula failed."
38 git pull origin ${branch}
43 echo "Directory: $2 does not exist"
48 echo "Directory: $2 does not exist"
52 git checkout ${branch}
54 echo "Checkout of branch ${branch} in ${src} failed."
57 git pull origin ${branch}
58 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h`
61 echo "Making $reltype for $base_pkg-$ver ..."
63 echo "OK? ctl-c to stop"
67 echo "Creating new tag -- $fulltag"
71 echo "Non-zero return status from Git"
75 echo "Create Tag $fulltag done"
77 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
80 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
83 echo "Non-zero return status from Git"
87 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
90 tar xfz $base_pkg-$ver.tar.gz
92 mv docs $base_pkg-$ver
94 ./configure --with-bacula=$bsrc
99 echo "Tarring docs ..."
100 tar cf $base_pkg-$ver.tar $base_pkg-$ver
101 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.*
102 echo "bzip2 docs ..."
103 bzip2 $base_pkg-$ver.tar
104 ./sign $base_pkg-$ver.tar.bz2
105 ls -l $base_pkg-$ver.tar.*
107 if [ a$push != ano ]; then