X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/4bf178c50c83dd2f057ff9c682c4cfd55efd7739..272af6a505831a25601a07b93b0cec98846e2749:/scripts/makerelease.sh diff --git a/scripts/makerelease.sh b/scripts/makerelease.sh index 716b57d6..2a34e9ef 100755 --- a/scripts/makerelease.sh +++ b/scripts/makerelease.sh @@ -1,7 +1,7 @@ #!/bin/sh # mkrelease.sh: Creates a release suitable for distfiles.atheme.org. # -# Copyright (c) 2007 atheme.org +# Copyright (c) 2007, 2011 atheme.org # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the above @@ -20,17 +20,13 @@ # if [ "x$1" = "x" ]; then - echo "usage: $0 releasename [--automatic]" + echo "usage: $0 releasename" exit else RELEASENAME="$1" fi -if [ "x$2" = "x--automatic" ]; then - AUTOMATIC="yes" -fi - -TIP=`hg tip --template "#rev#:#node|short#"` +TIP=`git log -1 --pretty=oneline | cut -d" " -f1` WRKDIR=`pwd` @@ -43,10 +39,14 @@ echo "Making release named $RELEASENAME (tip $TIP)" echo echo "Building root: $RELEASENAME/" -hg archive $RELEASENAME +cd .. +git archive --format=tar --prefix=$RELEASENAME/ HEAD | gzip >scripts/$RELEASENAME-working.tar.gz +cd $WRKDIR +tar -xzvf $RELEASENAME-working.tar.gz cd $RELEASENAME sh autogen.sh rm -rf autogen.sh autom4te.cache +rm -rf .gitignore # Run application specific instructions here. if [ -x "$WRKDIR/application.sh" ]; then @@ -56,45 +56,12 @@ fi cd .. echo "Building $RELEASENAME.tgz from $RELEASENAME/" -tar zcf $RELEASENAME.tgz $RELEASENAME/ +tar zcf $RELEASENAME.tar.gz $RELEASENAME/ echo "Building $RELEASENAME.tbz2 from $RELEASENAME/" -tar jcf $RELEASENAME.tbz2 $RELEASENAME/ +tar jcf $RELEASENAME.tar.bz2 $RELEASENAME/ -PUBLISH="yes" - -ok="0" -if [ "x$AUTOMATIC" != "xyes" ]; then - echo - echo "Would you like to publish these releases now?" - while [ $ok -eq 0 ]; do - echo -n "[$PUBLISH] " - - read INPUT - case $INPUT in - [Yy]*) - PUBLISH="yes" - ok=1 - ;; - [Nn]*) - PUBLISH="no" - ok=1 - ;; - esac - done -fi +rm $RELEASENAME-working.tar.gz +rm -rf $RELEASENAME -if [ "x$PUBLISH" = "xyes" ]; then - scp $RELEASENAME.tgz distfiles-master.atheme.org:/srv/distfiles - scp $RELEASENAME.tbz2 distfiles-master.atheme.org:/srv/distfiles - - echo - echo "The releases have been published, and will be available to the entire" - echo "distribution network within 15 minutes." -fi - -echo -echo "Done. If you have any bugs to report, report them against" -echo "the distfiles.atheme.org component at http://bugzilla.atheme.org" -echo "Thanks!" -echo +echo "Done. $RELEASENAME.tar.gz and $RELEASENAME.tar.bz2 built."