]>
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
8 # Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
9 # Licence: wxWindows licence
10 ##############################################################################
13 echo "$progname: $*" >&2
21 echo -n "$progname: $*"
32 while [ $# -gt 0 ]; do
37 msgn
" processing $filename ... "
38 eval "sed $cmd $filename" > $filename.$$
39 if cmp -s $filename $filename.$$
; then
43 mv $filename.$$
$filename
48 progname
=`basename $0`
50 # we must be run from wx directory
51 if [ ! -f wxwin.
m4 ]; then
52 error
"must be ran from root wx directory"
59 # the primary source of information is wx/version.h
60 ver_string
=`grep '#define wxVERSION_STRING ' include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
61 ver_major
=`echo $ver_string | sed 's/\([0-9]\{1,\}\)\..*/\1/'`
62 ver_minor
=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)\..*/\1/'`
63 ver_release
=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)$/\1/'`
65 msg
"Original version is $ver_major.$ver_minor.$ver_release"
67 ver_release_new
=$(($ver_release + 1))
68 ver_string_new
=$ver_major.
$ver_minor.
$ver_release_new
70 msg
"Updating version to $ver_string_new"
72 ver_for_sed
="$ver_major\.$ver_minor\.$ver_release"
74 run_sed configure.
in \
75 "/^AC_INIT/s/$ver_for_sed/$ver_string_new/" \
76 "s/^wx_release_number=$ver_release/wx_release_number=$ver_release_new/" \
77 "s/^wx_subrelease_number=.*$/wx_subrelease_number=0/"
80 run_sed
$f "/^%define *ver/s/$ver_for_sed/$ver_string_new/"
83 run_sed build
/osx
/wxvers.xcconfig \
84 "/DYLIB_.* = /s/$ver_for_sed/$ver_string_new/"
86 run_sed build
/tools
/bld_chm_exe.bat \
87 "/^SET WXW_VER=/s/$ver_for_sed/$ver_string_new/"
89 run_sed docs
/readme.txt \
90 "/wxWidgets /s/$ver_for_sed/$ver_string_new/" \
91 "/\//s/$ver_for_sed/$ver_string_new/" \
92 "/naming: while/s/$ver_for_sed/$ver_string_new/"
94 run_sed docs
/doxygen
/Doxyfile_inc \
95 "/^PROJECT_NUMBER/s/$ver_for_sed/$ver_string_new/"
97 run_sed docs
/doxygen
/latexdocstart.inc \
98 "/\\large Version/s/$ver_for_sed/$ver_string_new/"
100 run_sed include
/wx
/version.h \
101 "s/^\(#define wxRELEASE_NUMBER *\) $ver_release$/\1 $ver_release_new/" \
102 "s/^\(#define wxSUBRELEASE_NUMBER *\) [0-9]\{1,\}$/\1 0/" \
103 "/^#define wxVERSION_STRING/s/$ver_for_sed/$ver_string_new/"
105 run_sed include
/wx
/osx
/config_xcode.h \
106 "/^#define PACKAGE/s/$ver_for_sed/$ver_string_new/"
108 run_sed samples
/Info.plist \
109 "/version/s/$ver_for_sed/$ver_string_new/" \
110 "/<string>/s/$ver_for_sed/$ver_string_new/"
112 run_sed samples
/minimal
/Info_carbon.plist \
113 "/<string>/s/$ver_for_sed/$ver_string_new/"
114 run_sed samples
/minimal
/Info_cocoa.plist \
115 "/<string>/s/$ver_for_sed/$ver_string_new/"
117 run_sed samples
/docview
/Info.plist \
118 "/versionon/s/$ver_for_sed/$ver_string_new/" \
119 "/<string>/s/$ver_for_sed/$ver_string_new/"
121 msg
"Don't forget to change the C:R:A triplet in build/bakefiles/version.bkl now!"