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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boost/network/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#define BOOST_NETLIB_VERSION_MAJOR 0
#define BOOST_NETLIB_VERSION_MINOR 11
#define BOOST_NETLIB_VERSION_INCREMENT 1
#define BOOST_NETLIB_VERSION_INCREMENT 2

#ifndef BOOST_NETLIB_VERSION
#define BOOST_NETLIB_VERSION \
Expand Down
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