2016-12-24 20:41:30 +00:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# Bumps the version number from <current> to <next> on all libraries.
|
|
|
|
#
|
|
|
|
|
2018-01-24 02:53:02 +00:00
|
|
|
if [ -z "${1}" ] || [ -z "${2}" ]; then
|
2016-12-24 20:41:30 +00:00
|
|
|
echo "Usage: $0 <current> <next>"
|
|
|
|
echo "Example: $0 0.1.1 0.1.2"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-12-15 07:10:21 +00:00
|
|
|
today=$(date "+%b %d, %Y")
|
|
|
|
|
2016-12-24 20:41:30 +00:00
|
|
|
find . -name "*.toml" | xargs sed -i.bak "s/${1}/${2}/g"
|
2017-04-17 02:48:59 +00:00
|
|
|
find site/ -name "*.md" | xargs sed -i.bak "s/${1}/${2}/g"
|
2017-12-15 07:10:21 +00:00
|
|
|
sed -i.bak "s/^date.*/date = \"$today\"/" site/index.toml
|
2016-12-24 20:41:30 +00:00
|
|
|
find . -name "*.bak" | xargs rm
|