Skip to content
Snippets Groups Projects
Commit 25b9c90c authored by ko_oler's avatar ko_oler
Browse files

fix .gitlab-ci.yml

parent 1c723dd5
No related branches found
No related tags found
1 merge request!1Добавлена генерация файлов для frontend в Makefile и публикацию npm-пакета
Pipeline #19066 passed with stage
in 19 seconds
...@@ -17,9 +17,11 @@ publish_npm: ...@@ -17,9 +17,11 @@ publish_npm:
changes: changes:
- config/package.json - config/package.json
script: script:
- npm install -g typescript@4.7.4
- npm install -g ts-proto@1.115.5
- mkdir clients - mkdir clients
- npm install ts-proto@1.115.5
- make proto - make proto
- ls
- cd ./config - cd ./config
- rsync -a --prune-empty-dirs ../clients ./ - rsync -a --prune-empty-dirs ../clients ./
- | - |
...@@ -31,10 +33,9 @@ publish_npm: ...@@ -31,10 +33,9 @@ publish_npm:
echo "${CI_API_V4_URL#http*:}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}" echo "${CI_API_V4_URL#http*:}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} >> .npmrc } >> .npmrc
fi fi
- NPM_PACKAGE_CURRENT_VERSION=$(npm show ${NPM_PACKAGE_NAME} version) - NPM_PACKAGE_VERSION=$(node -p "require('./package.json').version")
- echo -E "$(jq --arg version $NPM_PACKAGE_CURRENT_VERSION '.version = $version' package.json)" > package.json
- yarn pub - yarn pub
- echo "Successfully published version ${NPM_PACKAGE_CURRENT_VERSION} of ${NPM_PACKAGE_NAME} to GitLab's NPM registry" - echo "Successfully published version ${NPM_PACKAGE_VERSION} to GitLab's NPM registry"
- rm -rf ./clients - rm -rf ./clients
- cd .. - cd ..
- rm -rf ./clients - rm -rf ./clients
\ No newline at end of file
...@@ -53,22 +53,22 @@ ifeq (,$(shell which npm)) ...@@ -53,22 +53,22 @@ 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\" \
# or visit \"https://github.com/microsoft/TypeScript\" for more.\n") or visit \"https://github.com/microsoft/TypeScript\" for more.\n")
#endif endif
#ifneq ($(shell expr $(TSC_MAJOR_VERSION) \>= 4), 1) ifneq ($(shell expr $(TSC_MAJOR_VERSION) \>= 4), 1)
# $(error "Current version is outdated. Please update typescript \n") $(error "Current version is outdated. Please update typescript \n")
#endif endif
#ifneq ($(shell expr $(TSC_MINOR_VERSION) \>= 7), 1) ifneq ($(shell expr $(TSC_MINOR_VERSION) \>= 7), 1)
# $(error "Current version is lower than 4.7 Please update typescript \n") $(error "Current version is lower than 4.7 Please update typescript \n")
#endif endif
#ifneq ($(shell expr $(TSC_MIC_VERSION) \>= 4), 1) ifneq ($(shell expr $(TSC_MIC_VERSION) \>= 4), 1)
# $(error "Current version is lower than 4.7.4 Please update typescript \n") $(error "Current version is lower than 4.7.4 Please update typescript \n")
#endif endif
\ No newline at end of file \ No newline at end of file
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