Accepting request 126213 from home:saschpe:branches:openSUSE:Tools
- Preserve whitespaces in Version: and Requires: lines OBS-URL: https://build.opensuse.org/request/show/126213 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-set_version?expand=0&rev=8
This commit is contained in:
parent
a4ef27dac4
commit
9e80363550
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 26 15:01:27 UTC 2012 - saschpe@suse.de
|
||||
|
||||
- Preserve whitespaces in Version: and Requires: lines
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 14 20:01:13 GMT 2012 - aspiers@suse.com
|
||||
|
||||
|
@ -16,13 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
Name: obs-service-set_version
|
||||
Summary: An OBS source service: Update spec file version
|
||||
License: GPL-2.0+
|
||||
Group: Development/Tools/Building
|
||||
Summary: An OBS source service: Update spec file version
|
||||
Version: 0.2
|
||||
Release: 1
|
||||
Release: 0
|
||||
Source: set_version
|
||||
Source1: set_version.service
|
||||
Requires: sed
|
||||
|
@ -76,12 +76,12 @@ write_files () {
|
||||
FILE=`ls -1 $i 2>/dev/null`
|
||||
[ -e "$FILE" ] || continue
|
||||
|
||||
sed "0,/^Version:.*/s//Version: $MYVERSION/" "$FILE" > "$MYOUTDIR/$FILE" || exit 1
|
||||
sed "0,/^Version:\(\s*\)[^%]*/s//Version:\1$MYVERSION/" "$FILE" > "$MYOUTDIR/$FILE" || exit 1
|
||||
echo "Updated first occurrence (if any) of Version in $FILE to $MYVERSION"
|
||||
if [ "${FILE%.spec}" != "$FILE" ]; then
|
||||
# set release back to zero after version upgrade, will be increased by OBS during build
|
||||
# also keep macros in release in case of fedora/mandriva
|
||||
sed -r -i 's,^Release:[^%]*,Release: 0,' "$MYOUTDIR/$FILE" || exit 1
|
||||
sed -r -i "s,^Release:(\s*)[^%]*,Release:\10," "$MYOUTDIR/$FILE" || exit 1
|
||||
fi
|
||||
|
||||
if [ "${FILE#_service:}" != "$FILE" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user