Accepting request 202603 from home:jblunck:branches:openSUSE:Tools

Take Debian version and revision number from debian.changelog.

OBS-URL: https://build.opensuse.org/request/show/202603
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-set_version?expand=0&rev=13
This commit is contained in:
2013-10-18 14:01:50 +00:00
committed by Git OBS Bridge
parent 4bd1ba3bd1
commit 9741042957
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