forked from extern/shorewall_code
Add script to change version (including updating .spec history)
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7897 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
9016e08942
commit
8ae77e6830
@ -473,7 +473,8 @@ if [ -n "${BUILDTARBALL}${BUILDRPM}" ]; then
|
||||
|
||||
if [ -n "$BUILDPERL" ]; then
|
||||
fgrep VERSION=$VERSION $PERLDIR/install.sh > /dev/null 2>&1 || fatal_error "Perl install.sh has wrong version"
|
||||
fgrep "VERSION => '$VERSION'" $PERLDIR/Shorewall/Config.pm > /dev/null 2>&1 || fatal_error "Perl Config.pm has wrong version"
|
||||
[ $(eval perl -e "'use lib \"$PERLDIR\"; use Shorewall::Config qw(:internal); print \"\$globals{VERSION}\n\"'") = $VERSION ] || \
|
||||
fatal_error "Perl Config.pm has wrong version"
|
||||
fi
|
||||
|
||||
if [ -n "$BUILDCOMMON" ]; then
|
||||
|
24
tools/build/setversion
Executable file
24
tools/build/setversion
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ $# -eq 1 ] || { echo "usage: setversion <version>" >&2; exit 1; }
|
||||
|
||||
for product in common lite shell perl; do
|
||||
eval perl -p -i -e "'s/VERSION=.*/VERSION=$1/'" Shorewall-${product}/install.sh
|
||||
done
|
||||
|
||||
for product in common lite; do
|
||||
eval perl -p -i -e "'s/^VERSION=.*/VERSION=$1/'" Shorewall-${product}/uninstall.sh Shorewall-${product}/fallback.sh
|
||||
done
|
||||
|
||||
for product in common lite shell perl; do
|
||||
eval perl -n -i -e "'s/^%define version .*/%device version $1/; \
|
||||
print \$_; \
|
||||
if ( /%changelog/ ) {\
|
||||
print \"\* $(date +'%a %b %d %Y') Tom Eastep tom\\@shorewall.net\\n\"; \
|
||||
print \"- Updated to $1\\n\"; \
|
||||
}'" Shorewall-${product}/shorewall-${product}.spec
|
||||
done
|
||||
|
||||
eval perl -p -i -e "'s/^(\s+)VERSION => .*/\$1VERSION => \"$1\",/'" Shorewall-perl/Shorewall/Config.pm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user