Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the script to update interface and update interface. #7

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions gen-interface.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /usr/bin/env bash

set -e

NEBULA_THIRDPARYTY_HOME=
Shylock-Hg marked this conversation as resolved.
Show resolved Hide resolved

# 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
Shylock-Hg marked this conversation as resolved.
Show resolved Hide resolved

rm common.thrift graph.thrift meta.thrift storage.thrift
Loading