Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/ws-manager-api/generate.sh
2492 views
1
#!/bin/bash
2
3
if [ -n "$DEBUG" ]; then
4
set -x
5
fi
6
7
set -o errexit
8
set -o nounset
9
set -o pipefail
10
11
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../../
12
COMPONENTS_DIR="$ROOT_DIR"/components
13
14
# include protoc bash functions
15
# shellcheck disable=SC1090,SC1091
16
source "$ROOT_DIR"/scripts/protoc-generator.sh
17
18
install_dependencies
19
go_protoc "$COMPONENTS_DIR"
20
typescript_protoc "$COMPONENTS_DIR"
21
22
# cd go
23
pushd go
24
25
# source mode does not always work for gRPC: see https://github.com/golang/mock/pull/163
26
mockgen \
27
-package mock \
28
github.com/gitpod-io/gitpod/ws-manager/api WorkspaceManager_SubscribeServer,WorkspaceManagerServer,WorkspaceManager_SubscribeClient,WorkspaceManagerClient > mock/mock.go
29
30
# return to previous directory
31
popd
32
33
pushd typescript/src
34
node "$COMPONENTS_DIR"/content-service-api/typescript/patch-grpc-js.ts
35
popd
36
37
update_license
38
39