Skip to content

Update packaging script (with some testing commits). #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 25, 2015
Prev Previous commit
Next Next commit
Update package script for package auto-bump.
  • Loading branch information
deanberris committed Mar 16, 2015
commit d42c17ca013a9240854295a57b38d1293156304a
21 changes: 21 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ if [ "$VERSION" == "" ]; then
VERSION="`git log --format=oneline | awk '{print $1}' | head -1`"
fi

# Break down the version in form "M.m.p" into individual variables.
BOOST_NETLIB_VERSION_MAJOR=`echo $VERSION | sed 's/[\._\-]/ /g' | awk '{print $1}'`
BOOST_NETLIB_VERSION_MINOR=`echo $VERSION | sed 's/[\._\-]/ /g' | awk '{print $2}'`
BOOST_NETLIB_VERSION_INCREMENT=`echo $VERSION | sed 's/[\._\-]/ /g' | awk '{print $3}'`

echo $BOOST_NETLIB_VERSION_MAJOR
echo $BOOST_NETLIB_VERSION_MINOR
echo $BOOST_NETLIB_VERSION_INCREMENT

# Then update the version.
sed -i '' 's/BOOST_NETLIB_VERSION_MAJOR [0-9]*/BOOST_NETLIB_VERSION_MAJOR '$BOOST_NETLIB_VERSION_MAJOR'/g' boost/network/version.hpp
sed -i '' 's/BOOST_NETLIB_VERSION_MINOR [0-9]*/BOOST_NETLIB_VERSION_MINOR '$BOOST_NETLIB_VERSION_MINOR'/g' boost/network/version.hpp
sed -i '' 's/BOOST_NETLIB_VERSION_INCREMENT [0-9]*/BOOST_NETLIB_VERSION_INCREMENT '$BOOST_NETLIB_VERSION_INCREMENT'/g' boost/network/version.hpp

# Show the diff
git diff boost/network/version.hpp

# Commit the change
git add boost/network/version.hpp
git commit -m"Bumping release number to $VERSION"

TAG="cpp-netlib-$VERSION"
git tag $TAG
echo "Tagged $TAG."
Expand Down