rocksdb/build_tools/version.sh
Igor Canadi 0908ddcea5 Don't keep managing two rocksdb version
Summary:
Before this diff, there are two places with rocksdb versions. After the diff:
1. we only have one source of truth for rocksdb version
2. we have a script that we can use to get the version that we can use in other compilations (java, go, etc).

Test Plan: make

Reviewers: yhchiang, sdong, ljin

Reviewed By: ljin

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D24333
2014-10-02 11:59:22 -07:00

13 lines
383 B
Bash
Executable file

if [ $# == 0 ]; then
echo "Usage: $0 major|minor|patch"
fi
if [[ $1 == "major" ]]; then
cat include/rocksdb/version.h | grep MAJOR | head -n1 | awk '{print $3}'
fi
if [[ $1 = "minor" ]]; then
cat include/rocksdb/version.h | grep MINOR | head -n1 | awk '{print $3}'
fi
if [[ $1 = "patch" ]]; then
cat include/rocksdb/version.h | grep PATCH | head -n1 | awk '{print $3}'
fi