1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#!/bin/bash
#
# Copyright (C) Anders Logg 2004-2008
# Licensed under the GNU GPL version 3 or any later version
#
# This script creates a new release of FFC
# Make sure FFC is installed (so we may run unit tests)
#echo '--- Uninstalling FFC'
#sudo python setup.py install
# Make sure we have the current version
echo '--- Synchronizing repository'
sleep 1
hg commit
hg pull ssh://ffc@fenics.org/hg/ffc
hg merge
hg commit
hg update
hg push ssh://ffc@fenics.org/hg/ffc
# Update version numbers
echo '--- Update version number in ChangeLog'
sleep 1
emacs -nw ChangeLog
echo '--- Update version number in constants.py'
sleep 1
emacs -nw ffc/common/constants.py
echo '--- Update version number in setup.py'
sleep 1
emacs -nw setup.py
# Install latest version
echo "Running commands for installing FFC locally on my machine. Sorry about that."
echo "We need to figure out a better way to organize the makedist script. /Anders"
fenics-install
fenics-dev
# Get the version number
VERSION=`grep 'FFC_VERSION' ffc/common/constants.py | cut -d'"' -f2`
echo "--- Version number is $VERSION"
# Run tests
echo '--- Running tests'
cd test
python test.py
echo '--- Only version numbers should differ, press return to continue'
read
cd regression
./update-references
cd ../..
# Run benchmark problem
echo '--- Running benchmark problem'
cd bench
echo "FFC version $VERSION" >> bench.log
date >> bench.log
echo "" >> bench.log
./bench >> bench.log
cd ../
# Tag repository
hg tag $VERSION
# Commit changes to hg
echo '--- Pushing changes to parent repository'
sleep 1
hg commit
hg push ssh://ffc@fenics.org/hg/ffc
# Create archive
hg archive -t tgz ffc-$VERSION.tar.gz
# Copy files to web page
echo '--- Copying files to web server'
scp ffc-$VERSION.tar.gz fenics@fenics.org:www.fenics.org/pub/software/ffc/v0.7
scp ChangeLog fenics@fenics.org:www.fenics.org/pub/software/ffc/
scp TODO fenics@fenics.org:www.fenics.org/pub/software/ffc/
# Notify ffc-dev of the new version
echo '--- Notifying mailing list'
SUBJECT="Version "$VERSION" of FFC released"
cat ChangeLog | mail -s "$SUBJECT" ffc-dev@fenics.org
# Edit web pages
echo '--- Edit web pages'
ssh -t fenics@fenics.org '/home/fenics/local/bin/news'
firefox http://www.fenics.org/wiki/Download
# Notify pypi
python setup.py register
|