Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogre/bumpversion.sh @ 11

Last change on this file since 11 was 11, checked in by landauf, 17 years ago
File size: 3.6 KB
Line 
1# alter the version number
2# required format ./bumpversion.sh <major> <minor> <patch> <codename> [<extra>]
3
4MAJOR=$1
5MINOR=$2
6PATCH=$3
7CODENAME=$4
8EXTRA=$5
9
10if [ -e $MAJOR ]
11then 
12        echo Major version cannot be blank
13        exit 1
14fi
15if [ -e $MINOR ]
16then 
17        echo Minor version cannot be blank
18        exit 1
19fi
20if [ -e $PATCH ]
21then 
22        echo Patch version cannot be blank
23        exit 1
24fi
25if [ -e $CODENAME ]
26then 
27        echo Codename cannot be blank
28        exit 1
29fi
30
31# configure.in
32#       AC_INIT([OGRE], [1.4.0])
33#       AM_INIT_AUTOMAKE([OGRE], 1.4.0)
34sed -i -e "s/AC_INIT(.*$/AC_INIT([OGRE], [$MAJOR.$MINOR.$PATCH])/i" configure.in
35sed -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
39sed -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')
43sed -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"
49sed -i -e "s/#define PACKAGE_STRING.*$/#define PACKAGE_STRING \"OGRE $MAJOR.$MINOR.$PATCH\"/i" Mac/Ogre/include/config.h
50sed -i -e "s/#define PACKAGE_VERSION.*$/#define PACKAGE_VERSION \"$MAJOR.$MINOR.$PATCH\"/i" Mac/Ogre/include/config.h
51sed -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"
59sed -i -e "s/define OGRE_VERSION_MAJOR.*$/define OGRE_VERSION_MAJOR $MAJOR/i" OgreMain/include/OgrePrerequisites.h
60sed -i -e "s/define OGRE_VERSION_MINOR.*$/define OGRE_VERSION_MINOR $MINOR/i" OgreMain/include/OgrePrerequisites.h
61sed -i -e "s/define OGRE_VERSION_PATCH.*$/define OGRE_VERSION_PATCH $PATCH/i" OgreMain/include/OgrePrerequisites.h
62sed -i -e "s/define OGRE_VERSION_SUFFIX.*$/define OGRE_VERSION_SUFFIX \"$EXTRA\"/i" OgreMain/include/OgrePrerequisites.h
63sed -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'
68sed -i -e "s/Name='OGRE Demos [0-9]*\.[0-9]*\.[0-9]*'/Name='OGRE Demos $MAJOR.$MINOR.$PATCH'/i" Samples/Common/setup/demos.wxs
69sed -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"
73sed -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"
77sed -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'
82sed -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'
86sed -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'
90sed -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'
94sed -i -e "s/Version='[0-9]*\.[0-9]*\.[0-9]*'/Version='$MAJOR.$MINOR.$PATCH'/i" Tools/XSIExport/setup/xsi6install.wxs
95
Note: See TracBrowser for help on using the repository browser.