forked from kritzware/google-ads-go
-
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.
Added googleapis submodule. Setup protoc scripts.
- Loading branch information
0 parents
commit 39eacef
Showing
118 changed files
with
29,928 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "googleapis"] | ||
path = googleapis | ||
url = https://github.com/googleapis/googleapis.git |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
ADS_VERSION=v0 | ||
PROTO_ROOT_DIR=googleapis/ | ||
PROTO_SRC_DIR=/google/ads/googleads/$(ADS_VERSION)/**/*.proto | ||
PROTO_OUT_DIR=$$GOPATH/src/github.com/kritzware/google-ads-go/protos/ | ||
PKG_PATH=paths=import | ||
PROTOC_GO_ARGS=--go_out=plugins=grpc,$(PKG_PATH):$(PROTO_OUT_DIR) | ||
|
||
ENTRY=main.go | ||
BIN=gads | ||
|
||
build: | ||
go build -o $$GOPATH/bin/$(BIN) $(ENTRY) | ||
|
||
run: | ||
go run $(ENTRY) | ||
|
||
run-debug: | ||
GODEBUG=http2debug=2 GRPC_GO_LOG_SEVERITY_LEVEL=info GRPC_GO_LOG_VERBOSITY_LEVEL=2 go run $(ENTRY) | ||
|
||
.SILENT protos: | ||
echo "converting protos for version $(ADS_VERSION)" | ||
for file in $(PROTO_ROOT_DIR)$(PROTO_SRC_DIR); do \ | ||
echo "converting proto $$(basename $$file)"; \ | ||
protoc -I=$(PROTO_ROOT_DIR) $(PROTOC_GO_ARGS) $$file; \ | ||
done; \ | ||
echo "built proto files to $$(basename $(PROTO_OUT_DIR))" | ||
|
||
clean-protos: | ||
rm -rf protos/* | ||
|
||
.PHONY: protos | ||
|
||
# proto: | ||
# protoc -I=$(SRC_DIR) --go_out=plugins=grpc:$(PROTO_OUT_DIR) $(SRC_DIR)$(SRC_INPUT) | ||
|
||
# .SILENT protos: clean-protos | ||
# echo "converting all protos in $(SRC_INPUT)"; \ | ||
# for file in $(SRC_DIR)$(SRC_INPUT); do \ | ||
# protoc -I=$(SRC_DIR) --go_out=plugins=grpc,$(PKG_PATH):$(PROTO_OUT_DIR) $$file; \ | ||
# done; \ |
Submodule googleapis
added at
444cd8
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
// services "github.com/kritzware/google-ads-go/protos/google/ads/googleads/v0/services" | ||
|
||
func main() { | ||
|
||
} |
Oops, something went wrong.