diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09b1efa0dbbb43052f0f58663a26e19a87d1833d..ff1f9f89c63876a807b17bff4c3f15859a808260 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ publish_npm: changes: - config/package.json script: - - npm install ts-proto@1.115.5 + - npm install -g ts-proto@1.115.5 - npm install -g typescript@4.7.4 - make proto - cd ./config diff --git a/Makefile b/Makefile index 0295bbcf3b68b052d5511f00210a1694e1162731..c8ab5cfae3068cf90d407374219d16b685f71c4d 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ .PHONY: proto-js .FORCE SHELL = /bin/bash -o pipefail -PROTODIR=perxis-proto/proto -DSTDIR=config/dist +PROTODIR=./perxis-proto/proto +DSTDIR=./config/dist ALLPROTO?=$(shell find $(PROTODIR) -name '*.proto' ) PROTOFILES= $(filter-out proto/status/status.proto, $(ALLPROTO)) @@ -22,7 +22,7 @@ proto-js: protoc-check js-check $(PROTOTSFILES) generate-ts generate-js %.ts: %.proto @protoc -I=$(PROTODIR) \ - --plugin=./node_modules/.bin/protoc-gen-ts_proto \ + --plugin=@protoc-gen-ts_proto \ --ts_proto_opt=env=browser,outputServices=generic-definitions,outputJsonMethods=false,esModuleInterop=true,useOptionals=messages,exportCommonSymbols=false,useDate=false,useExactTypes=false \ --ts_proto_out=$(DSTDIR) \ "$<" @@ -55,11 +55,11 @@ ifeq (,$(shell which npm)) $(error "NPM not found. Run for linux: \"sudo apt install npm\", for mac: \"brew install npm\" \ or visit \"https://docs.npmjs.com/getting-started\" for more.\n") endif -#ifeq (,$(shell which protoc-gen-ts_proto)) -# $(error "Ts-proto plugin for protoc not found. \ -# Run \"npm install -g ts-proto@1.115.5\" \ -# or visit \"https://github.com/stephenh/ts-proto\" for more.\n") -#endif +ifeq (,$(shell which protoc-gen-ts_proto)) + $(error "Ts-proto plugin for protoc not found. \ + Run \"npm install -g ts-proto@1.115.5\" \ + or visit \"https://github.com/stephenh/ts-proto\" for more.\n") +endif ifeq (,$(shell which tsc)) $(error "Typescript not found. \ Run \"npm install -g typescript@4.7.4\" \