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
40aea828
Commit
40aea828
authored
2 years ago
by
ko_oler
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-3
3 additions, 3 deletions
.gitlab-ci.yml
Makefile
+7
-7
7 additions, 7 deletions
Makefile
config/generate.sh
+0
-2
0 additions, 2 deletions
config/generate.sh
with
10 additions
and
12 deletions
.gitlab-ci.yml
+
3
−
3
View file @
40aea828
...
@@ -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")
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
7
−
7
View file @
40aea828
...
@@ -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
\"
\
...
...
This diff is collapsed.
Click to expand it.
config/generate.sh
+
0
−
2
View file @
40aea828
...
@@ -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
[@]
}
"
...
...
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