Updating Debian version to conform with expected numbering for upgrades
* Moving Debian changelog and Fedora specfile to input files and dynmaically updating versioning from OpenRGB.pro * Resolves #2919 * Related #2666master
parent
643e51e71b
commit
f8fe2ff7f8
@ -1,4 +1,4 @@
|
||||
openrgb (0.81.1) UNRELEASED; urgency=medium
|
||||
openrgb (__VERSION__) UNRELEASED; urgency=medium
|
||||
|
||||
* Builds from git master. See git history for more information.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%global _name OpenRGB
|
||||
|
||||
Name: openrgb
|
||||
Version: 0.8.1
|
||||
Version: __VERSION__
|
||||
Release: 0%{?dist}
|
||||
Summary: Open source RGB lighting control that doesn't depend on manufacturer software
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
PROJECT_FILE="OpenRGB.pro"
|
||||
VERSION_PATTERN="__VERSION__"
|
||||
INFILE_SUFFIX=".in"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "ERROR! No file give to parse."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INFILE_PATH=${1}${INFILE_SUFFIX}
|
||||
|
||||
if [ -e ${INFILE_PATH} ]; then
|
||||
echo "ERROR! Source file ${INFILE_PATH} missing."
|
||||
fi
|
||||
|
||||
if [ -e ${1} ]; then
|
||||
echo "Warning: File ${1} exists and will be overwritten"
|
||||
fi
|
||||
|
||||
MAJOR=$(grep MAJOR\ ${PROJECT_FILE} | cut -d= -f 2 | tr -d [:space:])
|
||||
MINOR=$(grep MINOR\ ${PROJECT_FILE} | cut -d= -f 2 | tr -d [:space:])
|
||||
REVISION=$(grep REVISION\ ${PROJECT_FILE} | cut -d= -f 2 | tr -d [:space:])
|
||||
|
||||
#Convert Revision to a nummber in case it is blank in the project file
|
||||
REVISION=$(( ${REVISION} + 0 ))
|
||||
|
||||
PACKAGE_VERSION="${MAJOR}.${MINOR}.${REVISION}"
|
||||
|
||||
sed -e "s/${VERSION_PATTERN}/${PACKAGE_VERSION}/g" ${INFILE_PATH} > ${1}
|
||||
Loading…
Reference in New Issue