Skip to content

Commit 3718936

Browse files
committed
8
1 parent 0610d1c commit 3718936

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

components/ide-metrics-api/typescript-grpcweb/build.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
#!/bin/bash
2-
# Copyright (c) 2020 Gitpod GmbH. All rights reserved.
2+
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
33
# Licensed under the GNU Affero General Public License (AGPL).
44
# See License-AGPL.txt in the project root for license information.
55

6+
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../../../
7+
8+
# include protoc bash functions
9+
# shellcheck disable=SC1090,SC1091
10+
source "$ROOT_DIR"/scripts/protoc-generator.sh
11+
12+
install_dependencies
13+
614
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)
715

816
THIRD_PARTY_INCLUDES=${PROTOLOC:-$DIR/..}
@@ -16,6 +24,7 @@ mkdir -p lib
1624
export PROTO_INCLUDE="-I$THIRD_PARTY_INCLUDES/third_party -I /usr/lib/protoc/include"
1725

1826
protoc -I"$THIRD_PARTY_INCLUDES"/third_party -I/usr/lib/protoc/include \
27+
--plugin=protoc-gen-grpc-web=/tmp/protoc-gen-grpc-web \
1928
--js_out=import_style=commonjs:lib \
2029
--grpc-web_out=import_style=commonjs+dts,mode=grpcweb:lib \
2130
-I"${PROTOLOC:-..}" "${PROTOLOC:-..}"/*.proto

components/ide-metrics-api/typescript-grpcweb/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"grpc-web": "^1.3.1"
1313
},
1414
"devDependencies": {
15-
"typescript": "~4.4.2",
16-
"protoc-gen-grpc-web": "~1.4.0"
15+
"typescript": "~4.4.2"
1716
}
1817
}

scripts/protoc-generator.sh

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ install_dependencies() {
1515

1616
curl -sSo /tmp/protoc-gen-grpc-java https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.45.0/protoc-gen-grpc-java-1.45.0-linux-x86_64.exe
1717
chmod +x /tmp/protoc-gen-grpc-java
18+
19+
curl -LsSo /tmp/protoc-gen-grpc-web https://github.com/grpc/grpc-web/releases/download/1.3.1/protoc-gen-grpc-web-1.3.1-linux-x86_64
20+
chmod +x /tmp/protoc-gen-grpc-web
1821
}
1922

2023
lint() {

0 commit comments

Comments
 (0)