Skip to content
Snippets Groups Projects
Commit 40aea828 authored by ko_oler's avatar ko_oler
Browse files

fix .gitlab-ci.yml

parent 376bde28
No related branches found
No related tags found
1 merge request!1Добавлена генерация файлов для frontend в Makefile и публикацию npm-пакета
Pipeline #19088 failed with stage
in 20 seconds
...@@ -7,16 +7,16 @@ publish_npm: ...@@ -7,16 +7,16 @@ publish_npm:
before_script: before_script:
- apk add --update bash - apk add --update bash
- apk add --update make - apk add --update make
- apk add --update yarn
- apk add --update jq
- apk add --update protobuf-dev - apk add --update protobuf-dev
- apk add --update yarn
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: changes:
- config/package.json - config/package.json
script: script:
- npm install ts-proto@1.115.5
- npm install -g typescript@4.7.4 - npm install -g typescript@4.7.4
- npm install -g ts-proto@1.115.5
- make proto - make proto
- cd ./config - cd ./config
- NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version") - NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
......
...@@ -22,13 +22,13 @@ proto-js: protoc-check js-check $(PROTOTSFILES) generate-ts generate-js ...@@ -22,13 +22,13 @@ proto-js: protoc-check js-check $(PROTOTSFILES) generate-ts generate-js
%.ts: %.proto %.ts: %.proto
@protoc -I=$(PROTODIR) \ @protoc -I=$(PROTODIR) \
--plugin=@protoc-gen-ts_proto \ --plugin=./node_modules/.bin/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_opt=env=browser,outputServices=generic-definitions,outputJsonMethods=false,esModuleInterop=true,useOptionals=messages,exportCommonSymbols=false,useDate=false,useExactTypes=false \
--ts_proto_out=$(DSTDIR) \ --ts_proto_out=$(DSTDIR) \
"$<" "$<"
generate-ts: generate-ts:
@echo "Generated all protobuf TypeScript files" @echo "Generated all TypeScript files"
generate-js: generate-js:
@./config/generate.sh @./config/generate.sh
...@@ -55,11 +55,11 @@ ifeq (,$(shell which npm)) ...@@ -55,11 +55,11 @@ ifeq (,$(shell which npm))
$(error "NPM not found. Run for linux: \"sudo apt install npm\", for mac: \"brew install 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") or visit \"https://docs.npmjs.com/getting-started\" for more.\n")
endif endif
ifeq (,$(shell which protoc-gen-ts_proto)) #ifeq (,$(shell which protoc-gen-ts_proto))
$(error "Ts-proto plugin for protoc not found. \ # $(error "Ts-proto plugin for protoc not found. \
Run \"npm install -g ts-proto@1.115.5\" \ # Run \"npm install -g ts-proto@1.115.5\" \
or visit \"https://github.com/stephenh/ts-proto\" for more.\n") # or visit \"https://github.com/stephenh/ts-proto\" for more.\n")
endif #endif
ifeq (,$(shell which tsc)) ifeq (,$(shell which tsc))
$(error "Typescript not found. \ $(error "Typescript not found. \
Run \"npm install -g typescript@4.7.4\" \ Run \"npm install -g typescript@4.7.4\" \
......
...@@ -54,7 +54,6 @@ generate_index() { ...@@ -54,7 +54,6 @@ generate_index() {
} }
echo "---deleting existing *.d.ts, *.d.ts.map, *.js, *.js.map files" echo "---deleting existing *.d.ts, *.d.ts.map, *.js, *.js.map files"
pwd
find ./config/dist/*/**/ -path '*.d.ts' -delete find ./config/dist/*/**/ -path '*.d.ts' -delete
find ./config/dist/*/**/ -path '*.d.ts.map' -delete find ./config/dist/*/**/ -path '*.d.ts.map' -delete
find ./config/dist/*/**/ -path '*.js' -delete find ./config/dist/*/**/ -path '*.js' -delete
...@@ -67,7 +66,6 @@ find ./config/dist -path '*.js.map' -delete ...@@ -67,7 +66,6 @@ find ./config/dist -path '*.js.map' -delete
find ./config/dist -path '*.ts.bak' -delete find ./config/dist -path '*.ts.bak' -delete
echo "---generating index.ts files" echo "---generating index.ts files"
pwd
ts_files=$(find ./config/dist/**/ -name '*.ts') ts_files=$(find ./config/dist/**/ -name '*.ts')
ts_files_array=($ts_files) ts_files_array=($ts_files)
generate_index "${ts_files_array[@]}" generate_index "${ts_files_array[@]}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment