File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,27 @@ if [ "$VERSION" == "" ]; then
12
12
VERSION=" ` git log --format=oneline | awk ' {print $1}' | head -1` "
13
13
fi
14
14
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
+
15
36
TAG=" cpp-netlib-$VERSION "
16
37
git tag $TAG
17
38
echo " Tagged $TAG ."
You can’t perform that action at this time.
0 commit comments