-
Notifications
You must be signed in to change notification settings - Fork 413
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 #295 from Red-GV/revert-294-hotel-reservation-proto
Revert "feature: pin binaries to create proto buffer go code"
- Loading branch information
Showing
194 changed files
with
10,276 additions
and
43,261 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 |
---|---|---|
|
@@ -8,4 +8,3 @@ build | |
wrk2/obj/ | ||
wrk2/wrk | ||
/wrk2/deps/ | ||
hotelReservation/bin/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,49 +1,14 @@ | ||
include .bingo/Variables.mk | ||
.PHONY: proto data run | ||
|
||
DOWNLOAD_DIR = /tmp | ||
BIN_DIR = $(shell pwd)/bin | ||
|
||
OS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/osx/') | ||
ARCH := $(shell uname -m | sed 's/arm64/aarch_64/') | ||
|
||
PROTOC_VERION = 25.0 | ||
PROTOC_PACKAGE = protoc-$(PROTOC_VERION)-$(OS)-$(ARCH) | ||
PROTOC_BIN = $(BIN_DIR)/protoc | ||
|
||
.PHONY: help | ||
help: ## Display this help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-24s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | ||
|
||
.PHONY: proto | ||
proto: protoc-plugin ## Generates proto buffer code | ||
proto: | ||
for f in services/**/proto/*.proto; do \ | ||
$(PROTOC_BIN) --go_out=. --go_opt=paths=source_relative $$f; \ | ||
protoc --go_out=plugins=grpc:. $$f; \ | ||
echo compiled: $$f; \ | ||
done | ||
|
||
.PHONY: data | ||
data: | ||
go-bindata -o data/bindata.go -pkg data data/*.json | ||
|
||
.PHONY: run | ||
run: ## Runs the application using docker-compose | ||
run: | ||
docker-compose build | ||
docker-compose up --remove-orphans | ||
|
||
.PHONY: bin | ||
bin: ## Creates bin directory | ||
mkdir -p $(BIN_DIR) | ||
|
||
.PHONY: clean | ||
clean: ## Removes all binaries in bin directory | ||
rm -rf $(BIN_DIR) | ||
rm -f $(GOBIN)/protoc-gen-go | ||
|
||
.PHONY: protoc | ||
protoc: bin $(PROTOC_GEN_GO) ## Downloads protoc compiler | ||
curl -LSs https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERION)/$(PROTOC_PACKAGE).zip -o $(DOWNLOAD_DIR)/$(PROTOC_PACKAGE).zip | ||
unzip -qqo $(DOWNLOAD_DIR)/$(PROTOC_PACKAGE).zip -d $(DOWNLOAD_DIR)/$(PROTOC_PACKAGE) | ||
mv -f $(DOWNLOAD_DIR)/$(PROTOC_PACKAGE)/bin/protoc $(BIN_DIR) | ||
|
||
.PHONY: protoc-plugin | ||
protoc-plugin: protoc $(PROTOC_GEN_GO) ## Copies the protoc plugin | ||
cp -f $(PROTOC_GEN_GO) $(GOBIN)/protoc-gen-go |
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
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
Oops, something went wrong.