forked from logrhythm/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#420 from Lucas-Caballero/clean-build-go-sc…
…ripts Removed the go code for rewriteProto and promoted it to a full LR repo p...
- Loading branch information
Showing
5 changed files
with
21 additions
and
243 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 |
---|---|---|
|
@@ -9,35 +9,37 @@ goLR=$GOPATH/src/github.schq.secious.com/Logrhythm | |
protoFileDir="$startDir"/protofiles | ||
scriptsDir="$startDir"/scripts | ||
thirdPartyDir="$startDir"/thirdParty | ||
|
||
# Seems as though we should be able to do a `go get` for this repo, but it | ||
# reports 'unrecognized import path' | ||
if [ ! -d $goLR/rewriteProto ]; then | ||
git clone github.schq.secious.com/Logrhythm/rewriteProto $goLR/rewriteProto | ||
fi | ||
go install github.schq.secious.com/Logrhythm/rewriteProto | ||
go get github.com/LogRhythm/protobuf/proto | ||
go get github.com/LogRhythm/protobuf/proto | ||
go get github.com/gogo/protobuf/protoc-gen-gogo | ||
go get github.com/gogo/protobuf/gogoproto | ||
|
||
mkdir -p $goSrc | ||
|
||
( cd $goSrc; | ||
for d in */ ; do | ||
#ignore UX files | ||
# if [ "$d" = "configelementsux/" ]; then | ||
# continue; | ||
# fi | ||
rm $goSrc/"$d"*.proto || true | ||
done | ||
( | ||
cd $goSrc; | ||
for d in */ ; do | ||
rm $goSrc/"$d"*.proto || true | ||
done | ||
) | ||
|
||
if [ ! -d "$goSrc" ]; then | ||
cd $goLR | ||
git clone [email protected]:Logrhythm/GoMessaging.git | ||
cd $startDir | ||
fi | ||
# rewriteProto process proto files for use with gogoprotobuf and deposits the result in $goSrc | ||
# which are then compiled into .pb.go files by protoc, etc below | ||
(cd "$protoFileDir"; rewriteProto -conf $goLR/rewriteProto/c.yml . $goSrc/) | ||
|
||
(cd "$protoFileDir"; "$scriptsDir"/rewriteProto/rewriteProto . $goSrc/) | ||
( | ||
cd $goSrc; | ||
find * -type d -exec /usr/bin/sh -c "protoc -I=$GOPATH/src/:/usr/local/include:/usr/include:$goSrc --gogo_out=$GOPATH/src/ $goSrc/{}/*.proto" \; | ||
find * -type d -exec /usr/bin/sh -c "rm $goSrc/{}/*.proto" \; | ||
|
||
( cd $goSrc; | ||
find * -not -path '*/\.*' -type d -exec /usr/bin/sh -c "protoc -I=$GOPATH/src/:/usr/local/include:/usr/local/probe/include:/usr/include:$goSrc:$goSrc --gogo_out=$GOPATH/src/ $goSrc/{}/*.proto" \; | ||
find * -not -path '*/\.*' -type d -exec /usr/bin/sh -c "rm $goSrc/{}/*.proto" \; | ||
#compile all main level protos | ||
protoc -I=$GOPATH/src/:/usr/local/include:/usr/include:/usr/local/probe/include:$goSrc:$goSrc --gogo_out=$GOPATH/src/ $goSrc/*.proto | ||
protoc -I=$GOPATH/src/:/usr/local/include:/usr/include:$goSrc --gogo_out=$GOPATH/src/ $goSrc/*.proto | ||
rm $goSrc/*.proto | ||
|
||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.