From 987ac993ee72102fdfc273002f4834f14a716487 Mon Sep 17 00:00:00 2001 From: ko_oler <kooler89@gmail.com> Date: Thu, 15 Dec 2022 18:23:45 +0800 Subject: [PATCH] fix .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- Makefile | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09b1efa..ff1f9f8 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 0295bbc..c8ab5cf 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\" \ -- GitLab