Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-js
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-js
Commits
877a16f4
Commit
877a16f4
authored
7 months ago
by
Dmitry Karyakin
Browse files
Options
Downloads
Patches
Plain Diff
Исправлено удаление временных файлов
parent
22152d82
No related branches found
No related tags found
1 merge request
!32
Обновлены версии JS зависимостей
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-2
1 addition, 2 deletions
.gitlab-ci.yml
Makefile
+3
-28
3 additions, 28 deletions
Makefile
config/generate.sh
+3
-3
3 additions, 3 deletions
config/generate.sh
with
7 additions
and
33 deletions
.gitlab-ci.yml
+
1
−
2
View file @
877a16f4
...
@@ -13,8 +13,7 @@ publish_npm:
...
@@ -13,8 +13,7 @@ publish_npm:
-
cd ./config && npm i && cd ../
-
cd ./config && npm i && cd ../
rules
:
rules
:
# - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
-
if
:
'
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH'
-
if
:
'
$CI_COMMIT_BRANCH'
changes
:
changes
:
-
config/package.json
-
config/package.json
script
:
script
:
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
3
−
28
View file @
877a16f4
...
@@ -3,7 +3,7 @@ SHELL = /bin/bash -o pipefail
...
@@ -3,7 +3,7 @@ SHELL = /bin/bash -o pipefail
PROTODIR
=
perxis-proto/proto
PROTODIR
=
perxis-proto/proto
DSTDIR
=
config/dist
DSTDIR
=
config/dist
TSPROTO
DIR
=
config/node_modules/.bin/protoc-gen-ts_proto
TSPROTO
PLUGIN
=
config/node_modules/.bin/protoc-gen-ts_proto
ALLPROTO
?=
$(
shell find
$(
PROTODIR
)
-name
'*.proto'
)
ALLPROTO
?=
$(
shell find
$(
PROTODIR
)
-name
'*.proto'
)
...
@@ -12,9 +12,6 @@ PROTOTSFILES=$(ALLPROTO:.proto=.ts)
...
@@ -12,9 +12,6 @@ PROTOTSFILES=$(ALLPROTO:.proto=.ts)
# PROTOC_MAJOR_VERSION=$(shell protoc --version | awk '{print $$2;}' | cut -d. -f1)
# PROTOC_MAJOR_VERSION=$(shell protoc --version | awk '{print $$2;}' | cut -d. -f1)
# PROTOC_MINOR_VERSION=$(shell protoc --version | awk '{print $$2;}' | cut -d. -f2)
# PROTOC_MINOR_VERSION=$(shell protoc --version | awk '{print $$2;}' | cut -d. -f2)
# 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)
$(
shell
mkdir
$(
DSTDIR
))
$(
shell
mkdir
$(
DSTDIR
))
# Генерация
# Генерация
...
@@ -23,7 +20,7 @@ js-client: protoc-check js-check $(PROTOTSFILES) generate-js
...
@@ -23,7 +20,7 @@ js-client: protoc-check js-check $(PROTOTSFILES) generate-js
%.ts
:
%.proto
%.ts
:
%.proto
@
protoc
-I
=
$(
PROTODIR
)
\
@
protoc
-I
=
$(
PROTODIR
)
\
--plugin
=
$(
TSPROTO
DIR
)
\
--plugin
=
$(
TSPROTO
PLUGIN
)
\
--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
)
\
"
$<
"
"
$<
"
...
@@ -55,26 +52,4 @@ js-check:
...
@@ -55,26 +52,4 @@ js-check:
ifeq
(,$(shell which npm))
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
# TODO точная версия ставится локально через npm i поэтому проверка не требуется
\ No newline at end of file
# ifeq (,$(shell which protoc-gen-ts_proto))
# $(error "Ts-proto plugin for protoc not found. \
# Run \"npm install -g ts-proto@1.158.0\" \
# 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@5.6.3\" \
# or visit \"https://github.com/microsoft/TypeScript\" for more.\n")
# endif
# BUG проверка для минимальной версии 5.1.6 будет ошибочно не пройдена с версией 5.6.3 так как
# каждая цифра проверяется отдельно
# ifneq ($(shell expr $(TSC_MAJOR_VERSION) \>= 5), 1)
# $(error "Current version is outdated. Please update typescript \n")
# endif
# ifneq ($(shell expr $(TSC_MINOR_VERSION) \>= 1), 1)
# $(error "Current version is lower than 5.1 Please update typescript \n")
# endif
# ifneq ($(shell expr $(TSC_MIC_VERSION) \>= 6), 1)
# $(error "Current version is lower than 5.1.6 Please update typescript \n")
# endif
This diff is collapsed.
Click to expand it.
config/generate.sh
+
3
−
3
View file @
877a16f4
...
@@ -50,14 +50,14 @@ generate_index() {
...
@@ -50,14 +50,14 @@ generate_index() {
cd
./config
cd
./config
echo
"Generate index.ts files"
echo
"Generate index.ts files"
ts_files
=
$(
find ./dist
/
**
/
-name
'*.ts'
)
ts_files
=
$(
find ./dist
-name
'*.ts'
-type
f
)
ts_files_array
=(
$ts_files
)
ts_files_array
=(
$ts_files
)
generate_index
"
${
ts_files_array
[@]
}
"
generate_index
"
${
ts_files_array
[@]
}
"
echo
"Generate *.js files"
echo
"Generate *.js files"
npx tsc
--project
./
--declaration
--declarationMap
--sourceMap
--rootDir
./dist
npx tsc
--declaration
--declarationMap
--sourceMap
--rootDir
./dist
echo
"Delete temporary files"
echo
"Delete temporary files"
find ./dist
-name
'
index
.ts'
-type
f
-delete
find ./dist
-name
'
*.ts'
!
-name
'*.d
.ts'
-type
f
-delete
echo
"Process finished"
echo
"Process finished"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment