Bump version to 3.5 and add version bumping script

This commit is contained in:
RichardG867
2022-04-26 13:42:38 -03:00
parent e01f897f88
commit 9b871ad249
6 changed files with 83 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ if(MUNT_EXTERNAL)
endif() endif()
project(86Box project(86Box
VERSION 3.4.1 VERSION 3.5
DESCRIPTION "Emulator of x86-based systems" DESCRIPTION "Emulator of x86-based systems"
HOMEPAGE_URL "https://86box.net" HOMEPAGE_URL "https://86box.net"
LANGUAGES C CXX) LANGUAGES C CXX)
@@ -188,6 +188,7 @@ endif()
if(NOT CMAKE_PROJECT_VERSION_PATCH) if(NOT CMAKE_PROJECT_VERSION_PATCH)
set(CMAKE_PROJECT_VERSION_PATCH 0) set(CMAKE_PROJECT_VERSION_PATCH 0)
endif() endif()
set(EMU_VERSION_EX "3.50")
if(NOT EMU_BUILD_NUM) if(NOT EMU_BUILD_NUM)
set(EMU_BUILD_NUM 0) set(EMU_BUILD_NUM 0)
endif() endif()

72
bumpversion.sh Normal file
View File

@@ -0,0 +1,72 @@
#!/bin/sh
#
# 86Box A hypervisor and IBM PC system emulator that specializes in
# running old operating systems and software designed for IBM
# PC systems and compatibles from 1981 through fairly recent
# system designs based on the PCI bus.
#
# This file is part of the 86Box distribution.
#
# Convenience script for changing the emulator's version.
#
#
# Authors: RichardG, <richardg867@gmail.com>
#
# Copyright 2022 RichardG.
#
# Parse arguments.
newversion="$1"
if [ -z "$(echo $newversion | grep '\.')" ]
then
echo '[!] Usage: bumpversion.sh x.y[.z]'
exit 1
fi
shift
# Extract version components.
newversion_maj=$(echo $newversion | cut -d. -f1)
newversion_min=$(echo $newversion | cut -d. -f2)
newversion_patch=$(echo $newversion | cut -d. -f3)
[ -z "$newversion_patch" ] && newversion_patch=0
base36() {
if [ $1 -lt 10 ]
then
echo $1
else
printf '%b' $(printf '\\%03o' $((55 + $1)))
fi
}
newversion_maj_base36=$(base36 $newversion_maj)
newversion_min_base36=$(base36 $newversion_min)
newversion_patch_base36=$(base36 $newversion_patch)
# Switch to the repository root directory.
cd "$(dirname "$0")"
# Patch files.
patch_file() {
# Stop if the file doesn't exist.
[ ! -e "$1" ] && return
# Patch file.
if sed -i -r -e "$3" "$1"
then
echo "[-] Patched $2 on $1"
else
echo "[!] Patching $2 on $1 failed"
fi
}
patch_file CMakeLists.txt VERSION 's/^(\s*VERSION ).+/\1'"$newversion"'/'
patch_file CMakeLists.txt EMU_VERSION_EX 's/(\s*set\(EMU_VERSION_EX\s+")[^"]+/\1'"$newversion_maj_base36.$newversion_min_base36$newversion_patch_base36"'/'
patch_file src/include_make/*/version.h EMU_VERSION 's/(#\s*define\s+EMU_VERSION\s+")[^"]+/\1'"$newversion"'/'
patch_file src/include_make/*/version.h EMU_VERSION_EX 's/(#\s*define\s+EMU_VERSION_EX\s+")[^"]+/\1'"$newversion_maj_base36.$newversion_min_base36$newversion_patch_base36"'/'
patch_file src/include_make/*/version.h EMU_VERSION_MAJ 's/(#\s*define\s+EMU_VERSION_MAJ\s+)[0-9]+/\1'"$newversion_maj"'/'
patch_file src/include_make/*/version.h EMU_VERSION_MIN 's/(#\s*define\s+EMU_VERSION_MIN\s+)[0-9]+/\1'"$newversion_min"'/'
patch_file src/include_make/*/version.h EMU_VERSION_PATCH 's/(#\s*define\s+EMU_VERSION_PATCH\s+)[0-9]+/\1'"$newversion_patch"'/'
patch_file src/include_make/*/version.h COPYRIGHT_YEAR 's/(#\s*define\s+COPYRIGHT_YEAR\s+)[0-9]+/\1'"$(date +%Y)"'/'
patch_file src/include_make/*/version.h EMU_DOCS_URL 's/(#\s*define\s+EMU_DOCS_URL\s+"https:\/\/[^\/]+\/en\/v)[^\/]+/\1'"$newversion_maj.$newversion_min"'/'
patch_file src/unix/assets/*.spec date 's/(%global\s+date\s+).+/\1'"$(date +%Y-%m-%d)"'/'
patch_file src/unix/assets/*.spec Version 's/(Version:\s+)[0-9].+/\1'"$newversion"'/'
patch_file src/unix/assets/*.metainfo.xml release 's/(<release version=")[^"]+(" date=")[^"]+/\1'"$newversion"'\2'"$(date +%Y-%m-%d)"'/'

View File

@@ -22,7 +22,7 @@
#define EMU_VERSION "@CMAKE_PROJECT_VERSION@" #define EMU_VERSION "@CMAKE_PROJECT_VERSION@"
#define EMU_VERSION_W LSTR(EMU_VERSION) #define EMU_VERSION_W LSTR(EMU_VERSION)
#define EMU_VERSION_EX "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@@CMAKE_PROJECT_VERSION_PATCH@" #define EMU_VERSION_EX "@EMU_VERSION_EX@"
#define EMU_VERSION_MAJ @CMAKE_PROJECT_VERSION_MAJOR@ #define EMU_VERSION_MAJ @CMAKE_PROJECT_VERSION_MAJOR@
#define EMU_VERSION_MIN @CMAKE_PROJECT_VERSION_MINOR@ #define EMU_VERSION_MIN @CMAKE_PROJECT_VERSION_MINOR@
#define EMU_VERSION_PATCH @CMAKE_PROJECT_VERSION_PATCH@ #define EMU_VERSION_PATCH @CMAKE_PROJECT_VERSION_PATCH@

View File

@@ -20,12 +20,12 @@
#define EMU_NAME "86Box" #define EMU_NAME "86Box"
#define EMU_NAME_W LSTR(EMU_NAME) #define EMU_NAME_W LSTR(EMU_NAME)
#define EMU_VERSION "3.4" #define EMU_VERSION "3.5"
#define EMU_VERSION_W LSTR(EMU_VERSION) #define EMU_VERSION_W LSTR(EMU_VERSION)
#define EMU_VERSION_EX "3.41" #define EMU_VERSION_EX "3.50"
#define EMU_VERSION_MAJ 3 #define EMU_VERSION_MAJ 3
#define EMU_VERSION_MIN 4 #define EMU_VERSION_MIN 5
#define EMU_VERSION_PATCH 1 #define EMU_VERSION_PATCH 0
#define EMU_BUILD_NUM 0 #define EMU_BUILD_NUM 0
@@ -40,7 +40,7 @@
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest" #define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL) #define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
#ifdef RELEASE_BUILD #ifdef RELEASE_BUILD
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v3.4/" # define EMU_DOCS_URL "https://86box.readthedocs.io/en/v3.5/"
#else #else
# define EMU_DOCS_URL "https://86box.readthedocs.io" # define EMU_DOCS_URL "https://86box.readthedocs.io"
#endif #endif

View File

@@ -12,11 +12,11 @@
# After a successful build, you can install the RPMs as follows: # After a successful build, you can install the RPMs as follows:
# sudo dnf install RPMS/$(uname -m)/86Box-3* RPMS/noarch/86Box-roms* # sudo dnf install RPMS/$(uname -m)/86Box-3* RPMS/noarch/86Box-roms*
%global date 2022-04-22 %global date 2022-04-26
%global romver 20220319 %global romver 20220319
Name: 86Box Name: 86Box
Version: 3.4.1 Version: 3.5
Release: 1%{?dist} Release: 1%{?dist}
Summary: Classic PC emulator Summary: Classic PC emulator
License: GPLv2+ License: GPLv2+

View File

@@ -10,7 +10,7 @@
</categories> </categories>
<launchable type="desktop-id">net.86box.86Box.desktop</launchable> <launchable type="desktop-id">net.86box.86Box.desktop</launchable>
<releases> <releases>
<release version="3.3" date="2022-03-19"/> <release version="3.5" date="2022-04-26"/>
</releases> </releases>
<content_rating type="oars-1.1" /> <content_rating type="oars-1.1" />
<description> <description>