File: makedist

package info (click to toggle)
ffc 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 50,704 kB
  • sloc: cpp: 572,515; python: 15,790; makefile: 134; sh: 67
file content (105 lines) | stat: -rwxr-xr-x 2,880 bytes parent folder | download | duplicates (2)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
#
# Copyright (C) 2004-2008 Anders Logg
#
# This file is part of FFC.
#
# FFC is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FFC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with FFC. If not, see <http://www.gnu.org/licenses/>.
#
# 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