2007-01-07 16:34:48 -05:00
|
|
|
#!/bin/sh
|
|
|
|
##############################################################################
|
|
|
|
# Name: misc/scripts/inc_release
|
|
|
|
# Purpose: increments the release version number in all files mentioned in
|
2015-02-08 06:17:35 -05:00
|
|
|
# docs/contributing/about-version-numbers.md
|
2007-01-07 16:34:48 -05:00
|
|
|
# Created: 2007-01-07
|
2019-04-22 08:12:05 -04:00
|
|
|
# Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
|
2007-01-07 16:34:48 -05:00
|
|
|
# Licence: wxWindows licence
|
|
|
|
##############################################################################
|
|
|
|
|
2019-04-21 14:26:07 -04:00
|
|
|
. `dirname $0`/run_sed_common.sh
|
2007-01-07 16:34:48 -05:00
|
|
|
|
|
|
|
# the primary source of information is wx/version.h
|
|
|
|
ver_string=`grep '#define wxVERSION_STRING ' include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
|
|
|
|
ver_major=`echo $ver_string | sed 's/\([0-9]\{1,\}\)\..*/\1/'`
|
|
|
|
ver_minor=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)\..*/\1/'`
|
|
|
|
ver_release=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)$/\1/'`
|
|
|
|
|
|
|
|
msg "Original version is $ver_major.$ver_minor.$ver_release"
|
|
|
|
|
|
|
|
ver_release_new=$(($ver_release + 1))
|
|
|
|
ver_string_new=$ver_major.$ver_minor.$ver_release_new
|
|
|
|
|
|
|
|
msg "Updating version to $ver_string_new"
|
|
|
|
|
|
|
|
ver_for_sed="$ver_major\.$ver_minor\.$ver_release"
|
|
|
|
|
|
|
|
run_sed configure.in \
|
|
|
|
"/^AC_INIT/s/$ver_for_sed/$ver_string_new/" \
|
|
|
|
"s/^wx_release_number=$ver_release/wx_release_number=$ver_release_new/" \
|
|
|
|
"s/^wx_subrelease_number=.*$/wx_subrelease_number=0/"
|
|
|
|
|
2010-07-12 18:49:59 -04:00
|
|
|
run_sed build/osx/wxvers.xcconfig \
|
|
|
|
"/DYLIB_.* = /s/$ver_for_sed/$ver_string_new/"
|
|
|
|
|
2011-12-02 18:44:22 -05:00
|
|
|
run_sed docs/readme.txt \
|
|
|
|
"/wxWidgets /s/$ver_for_sed/$ver_string_new/" \
|
|
|
|
"/\//s/$ver_for_sed/$ver_string_new/" \
|
|
|
|
"/naming: while/s/$ver_for_sed/$ver_string_new/"
|
|
|
|
|
2013-11-21 08:45:52 -05:00
|
|
|
run_sed docs/doxygen/Doxyfile \
|
2009-07-05 07:49:21 -04:00
|
|
|
"/^PROJECT_NUMBER/s/$ver_for_sed/$ver_string_new/"
|
2010-07-12 18:49:59 -04:00
|
|
|
|
|
|
|
run_sed include/wx/version.h \
|
|
|
|
"s/^\(#define wxRELEASE_NUMBER *\) $ver_release$/\1 $ver_release_new/" \
|
|
|
|
"s/^\(#define wxSUBRELEASE_NUMBER *\) [0-9]\{1,\}$/\1 0/" \
|
|
|
|
"/^#define wxVERSION_STRING/s/$ver_for_sed/$ver_string_new/"
|
|
|
|
|
|
|
|
run_sed include/wx/osx/config_xcode.h \
|
|
|
|
"/^#define PACKAGE/s/$ver_for_sed/$ver_string_new/"
|
|
|
|
|
2011-07-22 12:31:55 -04:00
|
|
|
run_sed samples/minimal/Info_cocoa.plist \
|
|
|
|
"/<string>/s/$ver_for_sed/$ver_string_new/"
|
|
|
|
|
2016-03-02 17:16:16 -05:00
|
|
|
run_sed build/msw/wx_setup.props \
|
|
|
|
"/<wxVersionString>/s/\($ver_major$ver_minor\)$ver_release/\1$ver_release_new/"
|
|
|
|
|
2016-04-28 17:30:29 -04:00
|
|
|
run_sed build/tools/msvs/getversion.bat \
|
|
|
|
"/wxRELEASE_NUMBER=/s/$ver_release/$ver_release_new/"
|
|
|
|
|
2011-12-18 09:38:47 -05:00
|
|
|
msg "Don't forget to change the C:R:A triplet in build/bakefiles/version.bkl now!"
|