forked from grame-cncm/inscore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
version
executable file
·73 lines (55 loc) · 1.62 KB
/
version
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
#!/bin/sh
#
# Interlude project
# version management tool
#
if [ $# -ne 1 ]
then
echo "usage: version version_num"
echo " version_num format: n.n.n"
exit 1
fi
if [ -d validation ]
then
echo "moving version number to $VERSION"
else
echo "### This script must be called from the repository root";
exit 1
fi
function toNum {
echo $1 | sed 's/\.\([^.]*\)$/\1/' | sed 's/^0*//'
}
ROOT=.
VERSION=$1
FVERSION=$(toNum $VERSION)
if [ -d validation ]
then
echo "moving version number to $VERSION"
else
echo "### This script must be called from the repository root";
exit 1
fi
/bin/echo -n $VERSION > version.txt
ITL=$ROOT/src/inscore/interface/INScore.h
echo " updating $ITL (recompile)"
sed "s/[1-9]\.[0-9][0-9]/$FVERSION/" $ITL > TMP$$
mv -f TMP$$ $ITL
DOXY=$ROOT/doc/doxygen/Doxyall
echo " updating $DOXY (regenerate doc)"
sed "s/^\(PROJECT_NUMBER[ ]*= *\)[0-9]*\.[0-9]*/\1$FVERSION/" $DOXY > TMP$$
mv -f TMP$$ $DOXY
DOXY=$ROOT/doc/doxygen/Doxylib
echo " updating $DOXY (regenerate doc)"
sed "s/^\(PROJECT_NUMBER[ ]*= *\)[0-9]*\.[0-9]*/\1$FVERSION/" $DOXY > TMP$$
mv -f TMP$$ $DOXY
DOXY=$ROOT/doc/doxygen/Doxyfile
echo " updating $DOXY (regenerate doc)"
sed "s/^\(PROJECT_NUMBER[ ]*= *\)[0-9]*\.[0-9]*/\1$FVERSION/" $DOXY > TMP$$
mv -f TMP$$ $DOXY
TEX=$ROOT/doc/doxygen/header.tex
echo " updating $TEX (regenerate doc)"
sed "s/\([vV]\.\)[0-9]*\.[0-9]*/\1$FVERSION/" $TEX > TMP$$
mv -f TMP$$ $TEX
echo "==> change manually info.plist, rc files in win32 folder and AndroiManifest"
open -t build/Info.plist build/Info-ios.plist win32/INScore.rc win32/Viewer/INScoreViewer.rc rsrc/android/AndroidManifest.xml
exit 0