]>
git.saurik.com Git - wxWidgets.git/blob - misc/scripts/inc_release
2 ##############################################################################
3 # Name: misc/scripts/inc_release
4 # Purpose: increments the release version number in all files mentioned in
7 # Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
8 # Licence: wxWindows licence
9 ##############################################################################
12 echo "$progname: $*" >&2
20 echo -n "$progname: $*"
31 while [ $# -gt 0 ]; do
36 msgn
" processing $filename ... "
37 eval "sed $cmd $filename" > $filename.$$
38 if cmp -s $filename $filename.$$
; then
42 mv $filename.$$
$filename
47 progname
=`basename $0`
49 # we must be run from wx directory
50 if [ ! -f wxwin.
m4 ]; then
51 error
"must be ran from root wx directory"
58 # the primary source of information is wx/version.h
59 ver_string
=`grep '#define wxVERSION_STRING ' include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
60 ver_major
=`echo $ver_string | sed 's/\([0-9]\{1,\}\)\..*/\1/'`
61 ver_minor
=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)\..*/\1/'`
62 ver_release
=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)$/\1/'`
64 msg
"Original version is $ver_major.$ver_minor.$ver_release"
66 ver_release_new
=$(($ver_release + 1))
67 ver_string_new
=$ver_major.
$ver_minor.
$ver_release_new
69 msg
"Updating version to $ver_string_new"
71 ver_for_sed
="$ver_major\.$ver_minor\.$ver_release"
73 run_sed configure.
in \
74 "/^AC_INIT/s/$ver_for_sed/$ver_string_new/" \
75 "s/^wx_release_number=$ver_release/wx_release_number=$ver_release_new/" \
76 "s/^wx_subrelease_number=.*$/wx_subrelease_number=0/"
79 run_sed
$f "/^%define *ver/s/$ver_for_sed/$ver_string_new/"
82 run_sed build
/osx
/wxvers.xcconfig \
83 "/DYLIB_.* = /s/$ver_for_sed/$ver_string_new/"
85 run_sed build
/tools
/bld_chm_exe.bat \
86 "/^SET WXW_VER=/s/$ver_for_sed/$ver_string_new/"
88 run_sed docs
/readme.txt \
89 "/wxWidgets /s/$ver_for_sed/$ver_string_new/" \
90 "/\//s/$ver_for_sed/$ver_string_new/" \
91 "/naming: while/s/$ver_for_sed/$ver_string_new/"
93 run_sed docs
/doxygen
/Doxyfile_inc \
94 "/^PROJECT_NUMBER/s/$ver_for_sed/$ver_string_new/"
96 run_sed docs
/doxygen
/latexdocstart.inc \
97 "/\\large Version/s/$ver_for_sed/$ver_string_new/"
99 run_sed include
/wx
/version.h \
100 "s/^\(#define wxRELEASE_NUMBER *\) $ver_release$/\1 $ver_release_new/" \
101 "s/^\(#define wxSUBRELEASE_NUMBER *\) [0-9]\{1,\}$/\1 0/" \
102 "/^#define wxVERSION_STRING/s/$ver_for_sed/$ver_string_new/"
104 run_sed include
/wx
/osx
/config_xcode.h \
105 "/^#define PACKAGE/s/$ver_for_sed/$ver_string_new/"
107 run_sed samples
/Info.plist \
108 "/version/s/$ver_for_sed/$ver_string_new/" \
109 "/<string>/s/$ver_for_sed/$ver_string_new/"
111 run_sed samples
/minimal
/Info_carbon.plist \
112 "/<string>/s/$ver_for_sed/$ver_string_new/"
113 run_sed samples
/minimal
/Info_cocoa.plist \
114 "/<string>/s/$ver_for_sed/$ver_string_new/"
116 run_sed samples
/docview
/Info.plist \
117 "/versionon/s/$ver_for_sed/$ver_string_new/" \
118 "/<string>/s/$ver_for_sed/$ver_string_new/"
120 msg
"Don't forget to change the C:R:A triplet in build/bakefiles/version.bkl now!"