2 # mkrelease.sh: Creates a release suitable for distfiles.atheme.org.
4 # Copyright (c) 2007 atheme.org
6 # Permission to use, copy, modify, and/or distribute this software for
7 # any purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
12 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
13 # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
14 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
15 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17 # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 if [ "x$1" = "x" ]; then
23 echo "usage: $0 releasename [--automatic]"
29 if [ "x$2" = "x--automatic" ]; then
33 TIP
=`hg tip --template "#rev#:#node|short#"`
37 if [ -d $RELEASENAME ]; then
38 echo "Deleting previous release named $RELEASENAME."
39 rm -rf $WRKDIR/$RELEASENAME/
42 echo "Making release named $RELEASENAME (tip $TIP)"
45 echo "Building root: $RELEASENAME/"
46 hg archive
$RELEASENAME
49 rm -rf autogen.sh autom4te.cache
51 # Run application specific instructions here.
52 if [ -x "$WRKDIR/application.sh" ]; then
53 .
$WRKDIR/application.sh
58 echo "Building $RELEASENAME.tgz from $RELEASENAME/"
59 tar zcf
$RELEASENAME.tgz
$RELEASENAME/
61 echo "Building $RELEASENAME.tbz2 from $RELEASENAME/"
62 tar jcf
$RELEASENAME.tbz2
$RELEASENAME/
67 if [ "x$AUTOMATIC" != "xyes" ]; then
69 echo "Would you like to publish these releases now?"
70 while [ $ok -eq 0 ]; do
87 if [ "x$PUBLISH" = "xyes" ]; then
88 scp
$RELEASENAME.tgz distfiles
-master.atheme.org
:/srv
/distfiles
89 scp
$RELEASENAME.tbz2 distfiles
-master.atheme.org
:/srv
/distfiles
92 echo "The releases have been published, and will be available to the entire"
93 echo "distribution network within 15 minutes."
97 echo "Done. If you have any bugs to report, report them against"
98 echo "the distfiles.atheme.org component at http://bugzilla.atheme.org"