1 | # alter the version number |
---|
2 | # required format ./bumpversion.sh <major> <minor> <patch> <codename> [<extra>] |
---|
3 | |
---|
4 | MAJOR=$1 |
---|
5 | MINOR=$2 |
---|
6 | PATCH=$3 |
---|
7 | CODENAME=$4 |
---|
8 | EXTRA=$5 |
---|
9 | |
---|
10 | if [ -e $MAJOR ] |
---|
11 | then |
---|
12 | echo Major version cannot be blank |
---|
13 | exit 1 |
---|
14 | fi |
---|
15 | if [ -e $MINOR ] |
---|
16 | then |
---|
17 | echo Minor version cannot be blank |
---|
18 | exit 1 |
---|
19 | fi |
---|
20 | if [ -e $PATCH ] |
---|
21 | then |
---|
22 | echo Patch version cannot be blank |
---|
23 | exit 1 |
---|
24 | fi |
---|
25 | if [ -e $CODENAME ] |
---|
26 | then |
---|
27 | echo Codename cannot be blank |
---|
28 | exit 1 |
---|
29 | fi |
---|
30 | |
---|
31 | # configure.in |
---|
32 | # AC_INIT([OGRE], [1.4.0]) |
---|
33 | # AM_INIT_AUTOMAKE([OGRE], 1.4.0) |
---|
34 | sed -i -e "s/AC_INIT(.*$/AC_INIT([OGRE], [$MAJOR.$MINOR.$PATCH])/i" configure.in |
---|
35 | sed -i -e "s/AM_INIT_AUTOMAKE(.*$/AM_INIT_AUTOMAKE([OGRE], $MAJOR.$MINOR.$PATCH)/i" configure.in |
---|
36 | |
---|
37 | # Docs/src/html.cfg |
---|
38 | # PROJECT_NUMBER = 1.4.0 |
---|
39 | sed -i -e "s/PROJECT_NUMBER.*$/PROJECT_NUMBER = $MAJOR.$MINOR.$PATCH/i" Docs/src/html.cfg |
---|
40 | |
---|
41 | # Docs/src/manual.texi |
---|
42 | # @settitle OGRE Manual v1.4.0 ('Eihort') |
---|
43 | sed -i -e "s/@settitle.*$/@settitle OGRE Manual v$MAJOR.$MINOR.$PATCH ('$CODENAME')/i" Docs/src/manual.texi |
---|
44 | |
---|
45 | # Mac/Ogre/include/config.h |
---|
46 | # #define PACKAGE_STRING "OGRE 1.4.0" |
---|
47 | # #define PACKAGE_VERSION "1.4.0" |
---|
48 | # #define VERSION "1.4.0" |
---|
49 | sed -i -e "s/#define PACKAGE_STRING.*$/#define PACKAGE_STRING \"OGRE $MAJOR.$MINOR.$PATCH\"/i" Mac/Ogre/include/config.h |
---|
50 | sed -i -e "s/#define PACKAGE_VERSION.*$/#define PACKAGE_VERSION \"$MAJOR.$MINOR.$PATCH\"/i" Mac/Ogre/include/config.h |
---|
51 | sed -i -e "s/#define VERSION.*$/#define VERSION \"$MAJOR.$MINOR.$PATCH\"/i" Mac/Ogre/include/config.h |
---|
52 | |
---|
53 | # OgreMain/include/OgrePrerequisites.h |
---|
54 | # #define OGRE_VERSION_MAJOR 1 |
---|
55 | # #define OGRE_VERSION_MINOR 4 |
---|
56 | # #define OGRE_VERSION_PATCH 0 |
---|
57 | # #define OGRE_VERSION_SUFFIX "RC1" |
---|
58 | # #define OGRE_VERSION_NAME "Eihort" |
---|
59 | sed -i -e "s/define OGRE_VERSION_MAJOR.*$/define OGRE_VERSION_MAJOR $MAJOR/i" OgreMain/include/OgrePrerequisites.h |
---|
60 | sed -i -e "s/define OGRE_VERSION_MINOR.*$/define OGRE_VERSION_MINOR $MINOR/i" OgreMain/include/OgrePrerequisites.h |
---|
61 | sed -i -e "s/define OGRE_VERSION_PATCH.*$/define OGRE_VERSION_PATCH $PATCH/i" OgreMain/include/OgrePrerequisites.h |
---|
62 | sed -i -e "s/define OGRE_VERSION_SUFFIX.*$/define OGRE_VERSION_SUFFIX \"$EXTRA\"/i" OgreMain/include/OgrePrerequisites.h |
---|
63 | sed -i -e "s/define OGRE_VERSION_NAME.*$/define OGRE_VERSION_NAME \"$CODENAME\"/i" OgreMain/include/OgrePrerequisites.h |
---|
64 | |
---|
65 | # Samples/Common/setup/demos.wxs |
---|
66 | # Name='OGRE Demos 1.2.5' |
---|
67 | # Version='1.2.5' |
---|
68 | sed -i -e "s/Name='OGRE Demos [0-9]*\.[0-9]*\.[0-9]*'/Name='OGRE Demos $MAJOR.$MINOR.$PATCH'/i" Samples/Common/setup/demos.wxs |
---|
69 | sed -i -e "s/Version='[0-9]*\.[0-9]*\.[0-9]*'/Version='$MAJOR.$MINOR.$PATCH'/i" Samples/Common/setup/demos.wxs |
---|
70 | |
---|
71 | # SDK/Win32/ogresdk.nsh |
---|
72 | # !define PRODUCT_VERSION "1.2.5" |
---|
73 | sed -i -e "s/PRODUCT_VERSION \".*$/PRODUCT_VERSION \"$MAJOR.$MINOR.$PATCH$EXTRA\"/i" SDK/Win32/ogresdk.nsh |
---|
74 | |
---|
75 | # SDK/OSX/make_osx.sh |
---|
76 | # OGRE_VERSION="v1.4.4" |
---|
77 | sed -i -e "s/OGRE_VERSION=.*$/OGRE_VERSION=\"v$MAJOR.$MINOR.$PATCH$EXTRA\"/i" SDK/OSX/make_osx.sh |
---|
78 | |
---|
79 | |
---|
80 | # Tools/Common/setup/commandlinetools.wxs |
---|
81 | # Version='1.2.5' |
---|
82 | sed -i -e "s/Version='[0-9]*\.[0-9]*\.[0-9]*'/Version='$MAJOR.$MINOR.$PATCH'/i" Tools/Common/setup/commandlinetools.wxs |
---|
83 | |
---|
84 | # Tools/MilkshapeExport/setup/milkshapeinstall.wxs |
---|
85 | # Version='1.2.5' |
---|
86 | sed -i -e "s/Version='[0-9]*\.[0-9]*\.[0-9]*'/Version='$MAJOR.$MINOR.$PATCH'/i" Tools/MilkshapeExport/setup/milkshapeinstall.wxs |
---|
87 | |
---|
88 | # Tools/XSIExport/setup/xsi5install.wxs |
---|
89 | # Version='1.2.5' |
---|
90 | sed -i -e "s/Version='[0-9]*\.[0-9]*\.[0-9]*'/Version='$MAJOR.$MINOR.$PATCH'/i" Tools/XSIExport/setup/xsi5install.wxs |
---|
91 | |
---|
92 | # Tools/XSIExport/setup/xsi6install.wxs |
---|
93 | # Version='1.2.5' |
---|
94 | sed -i -e "s/Version='[0-9]*\.[0-9]*\.[0-9]*'/Version='$MAJOR.$MINOR.$PATCH'/i" Tools/XSIExport/setup/xsi6install.wxs |
---|
95 | |
---|