mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-29 09:36:17 +00:00
0908ddcea5
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
13 lines
383 B
Bash
Executable file
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
|