Skip to content

Commit

Permalink
Makefile, tests, gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Feb 6, 2019
1 parent 07b6747 commit 2631ab3
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.DS_Store
.vscode/*
.idea/*

bin/*

# Ignore everything in vendor/, except for *.go files,
# LICENSE and COPYING. Ignore Go tests.
vendor/**/*
!vendor/**/
!vendor/**/*.go
!vendor/**/*.h
!vendor/**/*.s
!vendor/**/*.c
!vendor/**/*.proto
!vendor/**/LICENSE*
!vendor/**/COPYING*
vendor/**/*_test.go
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
all:
@echo "*****************************************"
@echo "** WebRPC Dev **"
@echo "*****************************************"
@echo "make <cmd>"
@echo ""
@echo "commands:"
@echo ""
@echo " + Testing:"
@echo " - test"
@echo ""
@echo " + Builds:"
@echo " - build"
@echo " - clean"
@echo " - generate"
@echo ""
@echo " + Dep management:"
@echo " - dep"
@echo " - dep-upgrade-all"
@echo ""


build:
go build -o ./bin/webrpc-gen ./cmd/webrpc-gen

test: generate
go test -v ./...

generate:
go generate ./...

clean:
rm -rf ./bin

dep:
@export GO111MODULE=on && \
go mod tidy && \
rm -rf ./vendor && go mod vendor

dep-upgrade-all:
@GO111MODULE=on go get -u
2 changes: 1 addition & 1 deletion examples/golang-basics/example.gen.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package proto

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion examples/golang-basics/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate webrpc-gen -schema=example.webrpc.json -target=go -pkg=main -server -client -out=./example.gen.go
//go:generate ../../bin/webrpc-gen -schema=example.webrpc.json -target=go -pkg=main -server -client -out=./example.gen.go
package main

import (
Expand Down
2 changes: 1 addition & 1 deletion gen/golang/embed/statik.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/webrpc-go/tests/rpc_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate webrpc-gen -schema=sample.webrpc.json -target=go -pkg=proto -server -client -out=./proto/proto.gen.go
//go:generate ../../../bin/webrpc-gen -schema=sample.webrpc.json -target=go -pkg=proto -server -client -out=./proto/proto.gen.go
package golang_test

import "testing"
Expand Down

0 comments on commit 2631ab3

Please sign in to comment.