Accepting request 203754 from openSUSE:Tools

Take Debian version and revision number from debian.changelog. (forwarded request 202603 from jblunck)

OBS-URL: https://build.opensuse.org/request/show/203754
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-set_version?expand=0&rev=7
This commit is contained in:
Tomáš Chvátal 2013-10-18 17:22:03 +00:00 committed by Git OBS Bridge
commit 655fc9afd4
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 8 10:06:26 UTC 2013 - jblunck@opensuse.org
- Take Debian version and revision number from debian.changelog file
-------------------------------------------------------------------
Tue Apr 16 09:30:01 UTC 2013 - adrian@suse.de

View File

@ -20,7 +20,7 @@ Name: obs-service-set_version
Summary: An OBS source service: Update spec file version
License: GPL-2.0+
Group: Development/Tools/Building
Version: 0.2
Version: 0.3
Release: 0
Source: set_version
Source1: set_version.service

View File

@ -56,6 +56,10 @@ get_version_from_file () {
if [ -z "$MYVERSION" ]; then
MYVERSION=`ls -1t | sed -n "s,$BASENAME.*[-_]\([0123456789].*\).zip$,\1,p" | head -n 1`
fi
if [ -z "$MYVERSION" ]; then
# take version number (and optional revision) from Debian changelog
MYVERSION=`head -n 1 *debian.changelog 2>/dev/null | sed -ne 's/.*(\(.*\)).*/\1/p'`
fi
if [ -z "$MYVERSION" ]; then
echo "ERROR: no version is given and can't get detected automatically"
exit 1