Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move protobuf spec of table FILE_SOURCES.BINARY_DATA into sonar-db
- Loading branch information
Simon Brandhof
committed
Jul 23, 2015
1 parent
5e36720
commit 17af536
Showing
37 changed files
with
571 additions
and
4,044 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,14 +1,25 @@ | |||
#!/bin/bash | #!/bin/bash | ||
|
|
||
# Usage: compile_protobuf <inputDir> <outputDir> | # Compiles all the Protocol Buffers files (*.proto) to Java source code. | ||
# IMPORTANT - protobuf 2.6.1 must be installed. Other versions are not supported. | |||
|
|||
# Usage: compile_protobuf <module> <type: main or test> | |||
function compile_protobuf { | function compile_protobuf { | ||
echo "Compiling [$1] to [$2]..." | INPUT="$1/src/$2/protobuf" | ||
mkdir -p $2 | OUTPUT="$1/src/$2/gen-java" | ||
protoc --proto_path=$1 --java_out=$2 $1/*.proto |
|
||
if [ -d $INPUT ] | |||
then | |||
echo "Compiling [$INPUT] to [$OUTPUT]..." | |||
rm -rf $OUTPUT | |||
mkdir -p $OUTPUT | |||
protoc --proto_path=$INPUT --java_out=$OUTPUT $INPUT/*.proto | |||
fi | |||
} | } | ||
|
|
||
compile_protobuf "sonar-core/src/test/protobuf" "sonar-core/src/test/gen-java" | compile_protobuf "sonar-batch-protocol" "main" | ||
compile_protobuf "sonar-batch-protocol/src/main/protobuf" "sonar-batch-protocol/src/main/gen-java" | compile_protobuf "sonar-core" "test" | ||
compile_protobuf "sonar-db" "main" | |||
|
|
||
|
|
||
|
|
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.