-
Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathgenRelease
executable file
·63 lines (48 loc) · 1.56 KB
/
genRelease
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
#! /bin/sh
die()
{
echo '*** ERROR ***' $*
exit 1
}
if [ $# -lt 1 ] ; then
echo 'USAGE : genRelease LABEL'
echo ' LABEL is the label for the release, e.g. 1.4'
exit 1
fi
allow_dirty_git=0
if [ $1 = "--dirty" ] ; then
allow_dirty_git=1; shift
fi
LABEL=$1; shift
echo "CHECK VERSION NUMBER in include/ofx.doxy; fix and rerun if needed."
grep PROJECT_NUMBER include/ofx.doxy
set -v
if [ $allow_dirty_git -eq 0 ]; then
if [ `git ls-files --modified | wc -l` -ne 0 ]; then
die "You have modified files; commit to git first before building release!"
fi
git clean -f # start clean; remove everything not managed by git
else
echo Allowing dirty git working dir... do not build release like this.
fi
rm -r doc
cd include
rm -r doc
# delete Emacs backups, else they could end up in the release.
find . -name '*~' -exec rm {} +
# Build the doxygen docs
doxygen ofx.doxy || die "building doxygen docs"
rm -rf ../doc/html
mv doc/html ../doc || die "Moving doxygen docs"
cd ..
# Build the ProgrammingGuide and ProgrammingReference
cd Documentation
make || die "building Programming Guide and Reference"
# Copy style assets to Ref and Guide directories
cp ../include/ofxStyle.css Reference/
cp ../include/ofxStyle.css Guide/
cd ..
(tar cf - doc | gzip > openfx-doc-$LABEL.tar.gz) || die "Tarring docs"
(tar cf - Examples | gzip > openfx-examples-$LABEL.tar.gz) || die "Tarring examples"
(tar cf - include | gzip > openfx-include-$LABEL.tar.gz) || die "Tarring include"
echo YOU NOW NEED TO COPY THIS TO frs.sourceforge.net and ADD THE RELEASE VIA THE SF WEB INTERFACE