2 # mkrelease.sh: Creates a release suitable for distfiles.atheme.org.
4 # Copyright (c) 2007, 2011 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
=`git log -1 --pretty=oneline | cut -d" " -f1`
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/"
47 git archive
--format=tar --prefix=$RELEASENAME/ HEAD
| gzip >scripts
/$RELEASENAME-working.
tar.gz
49 tar -xzvf $RELEASENAME-working.
tar.gz
52 rm -rf autogen.sh autom4te.cache
55 # Run application specific instructions here.
56 if [ -x "$WRKDIR/application.sh" ]; then
57 .
$WRKDIR/application.sh
62 echo "Building $RELEASENAME.tgz from $RELEASENAME/"
63 tar zcf
$RELEASENAME.
tar.gz
$RELEASENAME/
65 echo "Building $RELEASENAME.tbz2 from $RELEASENAME/"
66 tar jcf
$RELEASENAME.
tar.bz2
$RELEASENAME/
68 rm $RELEASENAME-working.
tar.gz
73 if [ "x$AUTOMATIC" != "xyes" ]; then
75 echo "Would you like to publish these releases now?"
76 while [ $ok -eq 0 ]; do
93 if [ "x$PUBLISH" = "xyes" ]; then
94 scp
$RELEASENAME.tgz hg.atheme.org
:/srv
/distfiles
95 scp
$RELEASENAME.tbz2 hg.atheme.org
:/srv
/distfiles
98 echo "The releases have been published, and will be available to the entire"
99 echo "distribution network within 15 minutes."
103 echo "Done. If you have any bugs to report, report them against"
104 echo "the distfiles.atheme.org component at http://jira.atheme.org"