mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r11916] Purpose:
Bug fix in release script Description: release --private should create a release without changing the current version of the library. This wasn't working for the libtool version, which was getting bumped regardless. Solution: Fixed the release and h5vers scripts to leave the source directory unchanged when bin/release --private is run. Platforms tested: mir (changes to scripts only)
This commit is contained in:
parent
42d4edcb4a
commit
5495641296
11
bin/h5vers
11
bin/h5vers
@ -233,12 +233,18 @@ if ($set) {
|
||||
@newver = @curver;
|
||||
}
|
||||
|
||||
# Note if the version increased or decreased
|
||||
my $version_increased="";
|
||||
# Print a warning if the version got smaller (don't check annot field)
|
||||
if ($newver[0]*1000000 + $newver[1]*1000 + $newver[2] <
|
||||
$curver[0]*1000000 + $curver[1]*1000 + $curver[2]) {
|
||||
printf STDERR "Warning: version decreased from %d.%d.%d to %d.%d.%d\n",
|
||||
@curver[0,1,2], @newver[0,1,2];
|
||||
}
|
||||
if ($newver[0]*1000000 + $newver[1]*1000 + $newver[2] >
|
||||
$curver[0]*1000000 + $curver[1]*1000 + $curver[2]) {
|
||||
$version_increased="true";
|
||||
}
|
||||
|
||||
# Update the version number if it changed.
|
||||
if ($newver[0]!=$curver[0] ||
|
||||
@ -252,8 +258,9 @@ if ($newver[0]!=$curver[0] ||
|
||||
close FILE;
|
||||
}
|
||||
|
||||
# Update the libtool shared library version in src/Makefile.am
|
||||
if ($LT_VERS) {
|
||||
# Update the libtool shared library version in src/Makefile.am if
|
||||
# the version number has increased.
|
||||
if ($LT_VERS && $version_increased) {
|
||||
open FILE, $LT_VERS or die "$LT_VERS: $!\n";
|
||||
my ($contentsy) = join "", <FILE>;
|
||||
close FILE;
|
||||
|
13
bin/release
13
bin/release
@ -115,7 +115,9 @@ RESTORE_VERSION()
|
||||
{
|
||||
if [ X-${VERS_OLD} != X- ]; then
|
||||
echo restoring version information back to $VERS_OLD
|
||||
bin/h5vers -s $VERS_OLD
|
||||
rm -f config/lt_vers.am
|
||||
cp $tmpdir/lt_vers.am config/lt_vers.am
|
||||
bin/h5vers -s $VERS_OLD > vers_out
|
||||
VERS_OLD=
|
||||
fi
|
||||
}
|
||||
@ -170,6 +172,9 @@ trap RESTORE_VERSION 0
|
||||
|
||||
if [ X$pmode = Xyes ]; then
|
||||
VERS_OLD=$VERS
|
||||
# Copy old version of config/lt_vers.am, since it's hard to
|
||||
# "undo" changes to it.
|
||||
cp config/lt_vers.am $tmpdir
|
||||
# Set version information to m.n.r-of$today.
|
||||
# (h5vers does not correctly handle just m.n.r-$today.)
|
||||
VERS=`echo $VERS | sed -e s/-.*//`-of$today
|
||||
@ -253,13 +258,13 @@ cp release_docs/RELEASE.txt $DEST/$HDF5_VERS-RELEASE.txt
|
||||
# Restore previous Makefile if existed.
|
||||
test -f $tmpdir/Makefile.x && mv $tmpdir/Makefile.x Makefile
|
||||
|
||||
# Remove temporary things
|
||||
rm -rf $tmpdir
|
||||
|
||||
# Restore OLD version information, then no need for trap.
|
||||
if [ X$pmode = Xyes ]; then
|
||||
RESTORE_VERSION
|
||||
trap 0
|
||||
fi
|
||||
|
||||
# Remove temporary things
|
||||
#rm -rf $tmpdir
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user