Skip to content

Add travis config #37

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

Closed
wants to merge 2 commits into from
Closed
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
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: go

script:
- make install
# Either `make regenerate` does not change any files or it does, in which case we print the diff and fail.
- (make regenerate && git ls-files --modified --deleted --others --exclude-standard | diff /dev/null -) || (git add -A && git diff -u HEAD && false)
- make test
3 changes: 1 addition & 2 deletions Make.protobuf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@
#
# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf

%.pb.go: %.proto
%.pb.go: %.proto
protoc --go_out=. $<

1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


all: install

install:
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion proto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ install:
test: install generate-test-pbs
go test


generate-test-pbs:
make install
make -C testdata
Expand Down
8 changes: 5 additions & 3 deletions protoc-gen-go/descriptor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
# Not stored here, but descriptor.proto is in https://github.com/google/protobuf/
# at src/google/protobuf/descriptor.proto
regenerate:
echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION
@echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION
# The below `.bak` is a dirty hack to work around an incompatability between
# GNU sed and BSD sed. See http://stackoverflow.com/questions/5694228
cd $(HOME)/src/protobuf/src && \
protoc --go_out=. ./google/protobuf/descriptor.proto && \
sed -i 's,^package google_protobuf,package descriptor,' google/protobuf/descriptor.pb.go && \
cp ./google/protobuf/descriptor.pb.go $(GOPATH)/src/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
sed -i.bak 's,^package google_protobuf,package descriptor,' google/protobuf/descriptor.pb.go
cp $(HOME)/src/protobuf/src/google/protobuf/descriptor.pb.go descriptor.pb.go

restore:
cp descriptor.pb.golden descriptor.pb.go
Expand Down
174 changes: 158 additions & 16 deletions protoc-gen-go/descriptor/descriptor.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions protoc-gen-go/plugin/plugin.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.