From 2bf2594b1c659cbb30060183bed3fd0bb7a831e8 Mon Sep 17 00:00:00 2001
From: ko_oler <kooler89@gmail.com>
Date: Tue, 20 Dec 2022 20:52:07 +0800
Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?=
 =?UTF-8?q?=D0=BE=20=D0=9F=D0=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 15 ++++++---------
 Makefile       |  6 ++----
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 15c96d6..1439579 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,24 +1,21 @@
 stages:
-  - publish-npm
+  - deploy
 
 publish_npm:
   image: "node:current-alpine"
-  stage: publish-npm
+  stage: deploy
   variables:
     GIT_SUBMODULE_STRATEGY: recursive
   before_script:
-    - apk add --update bash
-    - apk add --update make
-    - apk add --update protobuf-dev
-    - apk add --update yarn
+    - apk add --update make bash protobuf-dev yarn
+    - npm install -g ts-proto@1.115.5
+    - npm install -g typescript@4.7.4
 
   rules:
-    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
       changes:
         - config/package.json
   script:
-    - npm install -g ts-proto@1.115.5
-    - npm install -g typescript@4.7.4
     - mkdir config/dist
     - make proto
     - cd ./config
diff --git a/Makefile b/Makefile
index 61b6322..c32db0e 100644
--- a/Makefile
+++ b/Makefile
@@ -14,10 +14,8 @@ TSC_MAJOR_VERSION=$(shell tsc --version | awk '{print $$2;}' | cut -d. -f1)
 TSC_MINOR_VERSION=$(shell tsc --version | awk '{print $$2;}' | cut -d. -f2)
 TSC_MIC_VERSION=$(shell tsc --version | awk '{print $$2;}' | cut -d. -f3)
 
-# Генерация js
-proto: proto-js
-
-proto-js: protoc-check js-check $(PROTOTSFILES) generate-ts generate-js
+# Генерация
+proto: protoc-check js-check $(PROTOTSFILES) generate-ts generate-js
 	@echo "Generated all protobuf JavaScrypt files"
 
 %.ts: %.proto
-- 
GitLab