Skip to content

Commit d42c17c

Browse files
committed
Update package script for package auto-bump.
1 parent 909deba commit d42c17c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

package.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ if [ "$VERSION" == "" ]; then
1212
VERSION="`git log --format=oneline | awk '{print $1}' | head -1`"
1313
fi
1414

15+
# Break down the version in form "M.m.p" into individual variables.
16+
BOOST_NETLIB_VERSION_MAJOR=`echo $VERSION | sed 's/[\._\-]/ /g' | awk '{print $1}'`
17+
BOOST_NETLIB_VERSION_MINOR=`echo $VERSION | sed 's/[\._\-]/ /g' | awk '{print $2}'`
18+
BOOST_NETLIB_VERSION_INCREMENT=`echo $VERSION | sed 's/[\._\-]/ /g' | awk '{print $3}'`
19+
20+
echo $BOOST_NETLIB_VERSION_MAJOR
21+
echo $BOOST_NETLIB_VERSION_MINOR
22+
echo $BOOST_NETLIB_VERSION_INCREMENT
23+
24+
# Then update the version.
25+
sed -i '' 's/BOOST_NETLIB_VERSION_MAJOR [0-9]*/BOOST_NETLIB_VERSION_MAJOR '$BOOST_NETLIB_VERSION_MAJOR'/g' boost/network/version.hpp
26+
sed -i '' 's/BOOST_NETLIB_VERSION_MINOR [0-9]*/BOOST_NETLIB_VERSION_MINOR '$BOOST_NETLIB_VERSION_MINOR'/g' boost/network/version.hpp
27+
sed -i '' 's/BOOST_NETLIB_VERSION_INCREMENT [0-9]*/BOOST_NETLIB_VERSION_INCREMENT '$BOOST_NETLIB_VERSION_INCREMENT'/g' boost/network/version.hpp
28+
29+
# Show the diff
30+
git diff boost/network/version.hpp
31+
32+
# Commit the change
33+
git add boost/network/version.hpp
34+
git commit -m"Bumping release number to $VERSION"
35+
1536
TAG="cpp-netlib-$VERSION"
1637
git tag $TAG
1738
echo "Tagged $TAG."

0 commit comments

Comments
 (0)