gitee.com/mirrors/gauge@v1.0.6/genproto.sh (about)

     1  # Copyright 2015 ThoughtWorks, Inc.
     2  
     3  # This file is part of Gauge.
     4  
     5  # Gauge is free software: you can redistribute it and/or modify
     6  # it under the terms of the GNU General Public License as published by
     7  # the Free Software Foundation, either version 3 of the License, or
     8  # (at your option) any later version.
     9  
    10  # Gauge is distributed in the hope that it will be useful,
    11  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  # GNU General Public License for more details.
    14  
    15  # You should have received a copy of the GNU General Public License
    16  # along with Gauge.  If not, see <http://www.gnu.org/licenses/>.
    17  
    18  #!/bin/sh
    19  
    20  #Using protoc version 3.0.0
    21  
    22  cd gauge-proto
    23  PATH=$PATH:$GOPATH/bin protoc --go_out=plugins=grpc:../gauge_messages *.proto
    24  
    25  cd ..
    26  sed  -i.backup '/import gauge_messages1 "spec.pb"/d' gauge_messages/messages.pb.go && sed  -i.backup 's/gauge_messages1.//g' gauge_messages/messages.pb.go && rm gauge_messages/messages.pb.go.backup
    27  sed  -i.backup '/import gauge_messages1 "spec.pb"/d' gauge_messages/api.pb.go && sed  -i.backup 's/gauge_messages1.//g' gauge_messages/api.pb.go && rm gauge_messages/api.pb.go.backup
    28  
    29  sed -i.backup '/import "."/d' gauge_messages/api.pb.go && rm gauge_messages/api.pb.go.backup
    30  sed -i.backup '/import "."/d' gauge_messages/messages.pb.go && rm gauge_messages/messages.pb.go.backup
    31  # go fmt github.com/getgauge/gauge/...