Commit 6d488377 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith

Added release script

parent 43997de4
logs
htdocs/js/MochiKit/Packed.js
test/mahara-*.tar.bz2
test/mahara-*.tar.gz
test/mahara-*.zip
#!/bin/sh
print_usage() {
echo "Usage is release.sh major minor"
echo "e.g. release.sh 0.6 2"
echo ""
exit 1;
}
MAJOR="$1"
MINOR="$2"
BUILDDIR="/tmp/mahara_release"
CURRENTDIR="`pwd`"
if [ -z "${MAJOR}" ] || [ -z "${MINOR}" ]; then
print_usage;
fi
if [ -d ${BUILDDIR} ]; then
rm -rf ${BUILDDIR}
fi
mkdir ${BUILDDIR}
pushd ${BUILDDIR}
# Get the stable branch
cg-clone "http://git.catalyst.net.nz/git/mahara.git#${MAJOR}_STABLE"
pushd ${BUILDDIR}/mahara
# Switch to the release tag
cg-switch -r ${MAJOR}.${MINOR}_RELEASE -f master
# Remove git directories
rm .git -rf
# Pack MochiKit
scripts/pack.sh
# Fix MochiKit packed link
pushd ${BUILDDIR}/mahara/htdocs/js/MochiKit
rm setup.js
ln -s Packed.js setup.js
popd
popd
mv mahara mahara-${MAJOR}.${MINOR}
tar zcf ${CURRENTDIR}/mahara-${MAJOR}.${MINOR}.tar.gz mahara-${MAJOR}.${MINOR}
tar jcf ${CURRENTDIR}/mahara-${MAJOR}.${MINOR}.tar.bz2 mahara-${MAJOR}.${MINOR}
zip -qrT9 ${CURRENTDIR}/mahara-${MAJOR}.${MINOR}.zip mahara-${MAJOR}.${MINOR}
popd
#rm -rf ${BUILDDIR}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment