-
Notifications
You must be signed in to change notification settings - Fork 36
/
version
executable file
·49 lines (39 loc) · 1.29 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
#!/bin/sh
#
# libmusicxml project
# version management tool
#
if [ $# -ne 1 ]
then
echo "usage: version version_num"
echo " version_num format: n.n"
exit 1
fi
ROOT=.
VERSION=$1
# echo "moving version number to $VERSION"
# CMAKE=$ROOT/build/CMakeLists.txt
# echo " updating $CMAKE"
# sed "s/VERSION *[1-9]\.[0-9][0-9]+/VERSION $VERSION/" $CMAKE \
# | sed "s/v\.[1-9]\.[0-9][0-9]+/v.$VERSION/" \
# | sed "s/\"[1-9]\.[0-9][0-9]+\"/\"$VERSION\"/" > TMP$$
# mv -f TMP$$ $CMAKE
MAKE=$ROOT/build/Makefile
echo " updating $MAKE"
sed "s/VERSION *= *[1-9]\.[0-9][0-9]*/VERSION = $VERSION/" $MAKE > TMP$$
mv -f TMP$$ $MAKE
DOXY=$ROOT/doc/Doxyfile
echo " updating $DOXY (regenerate doc)"
sed "s/^\(PROJECT_NUMBER[ ]*= *\)[0-9]*\.[0-9]*/\1$VERSION/" $DOXY > TMP$$
mv -f TMP$$ $DOXY
PKG=$ROOT/packages/Makefile
echo " updating $PKG"
sed "s/\(VERSION *:= *\)[0-9]*\.[0-9]*/\1$VERSION/" $PKG > TMP$$
mv -f TMP$$ $PKG
# NPM=$ROOT/javascript/npm/package.json
# echo " updating $NPM"
# sed "s/\(\"version\": \"\)[0-9]*\.[0-9]*\.[0-9]*/\1$VERSION/" $NPM > TMP$$
# mv -f TMP$$ $NPM
echo "==> change manually info.plist, rc files in win32 folder and AndroiManifest"
open -t $ROOT/src/elements/versions.cpp $ROOT/win32/libmusicxml/libmusicxml.rc $ROOT/build/CMakeLists.txt $ROOT/javascript/npm/package.json
exit 0