-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the script to update interface and update interface. (#7)
- Loading branch information
1 parent
bd94949
commit 668bc6c
Showing
5 changed files
with
5,019 additions
and
1,838 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -e | ||
|
||
NEBULA_THIRDPARYTY_HOME= | ||
|
||
# Parsing options from arguments | ||
while getopts "t:" opt; do | ||
case $opt in | ||
t) | ||
NEBULA_THIRDPARYTY_HOME=${OPTARG} | ||
;; | ||
\?) | ||
echo "Invalid option: -${OPTARG}" >&2 | ||
exit 1 | ||
;; | ||
:) | ||
echo "Option -${OPTARG} requires an argument." >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
for mod in common meta storage graph; do | ||
wget https://raw.githubusercontent.com/vesoft-inc/nebula-common/master/src/common/interface/$mod.thrift | ||
done | ||
|
||
for mod in common meta storage graph; do | ||
$NEBULA_THIRDPARYTY_HOME/2.0/bin/thrift1 --strict --allow-neg-enum-vals --gen "mstch_rust" -o ./src/interface/$mod/ $mod.thrift | ||
mv ./src/interface/$mod/gen-rust/lib.rs ./src/interface/$mod | ||
rmdir ./src/interface/$mod/gen-rust | ||
done | ||
|
||
rm common.thrift graph.thrift meta.thrift storage.thrift |
Oops, something went wrong.