File: update-version-number

package info (click to toggle)
dosbox-x 2025.12.01%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,224 kB
  • sloc: cpp: 339,768; ansic: 165,257; sh: 1,455; makefile: 963; perl: 385; python: 106; asm: 57
file content (29 lines) | stat: -rwxr-xr-x 1,056 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash

if [ -z "${1}" ]
  then
    echo "No version number specified."
    exit
fi

ver=${1}

pushd "$(git rev-parse --show-toplevel)" > /dev/null || exit

find contrib/translations -type f -name '*.lng' -exec sed -b -i "s/^:DOSBOX-X:VERSION:\([0-9.]\+\)/:DOSBOX-X:VERSION:${ver}/" {} +

find . -type f -name '*.conf' -exec sed -b -i "s/^# This is the configuration file for DOSBox-X \([0-9.]\+\)/# This is the configuration file for DOSBox-X ${ver}./" {} +

sed -b -i "s/PACKAGE_STRING \"dosbox-x \([0-9.]\+\)\"/PACKAGE_STRING \"dosbox-x ${ver}\"/" vs/config_package.h

sed -b -i "s/VERSION \"\([0-9.]\+\)\"/VERSION \"${ver}\"/g" vs/config_package.h

sed -b -i "s/^AC_INIT(dosbox-x,\([0-9.]\+\)/AC_INIT(dosbox-x,${ver}/" configure.ac

find contrib/windows/installer -type f -name '*.iss' -exec sed -b -i "s/^#define MyAppVersion \"\([0-9.]\+\)\"/#define MyAppVersion \"${ver}\"/" {} +

ver=$(echo "${ver}" | tr . ,)

sed -b -i "s/^#define VERSION_NUMBER \([0-9,]\+\)/#define VERSION_NUMBER ${ver},0/" src/winres.rc

popd > /dev/null || exit