Manuel Alejandro de Brito Fontes 9dfea94c9b Run shellcheck against scripts
2021-06-04 16:26:37 -04:00

38 lines
865 B
Bash
Executable File

#!/bin/bash
if [ -n "$DEBUG" ]; then
set -x
fi
set -o errexit
set -o nounset
set -o pipefail
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../../
COMPONENTS_DIR="$ROOT_DIR"/components
# include protoc bash functions
# shellcheck disable=SC1090,SC1091
source "$ROOT_DIR"/scripts/protoc-generator.sh
install_dependencies
go_protoc "$COMPONENTS_DIR"
typescript_protoc "$COMPONENTS_DIR"
# cd go
pushd go
# source mode does not always work for gRPC: see https://github.com/golang/mock/pull/163
mockgen \
-package mock \
github.com/gitpod-io/gitpod/ws-manager/api WorkspaceManager_SubscribeServer,WorkspaceManagerServer,WorkspaceManager_SubscribeClient,WorkspaceManagerClient > mock/mock.go
# return to previous directory
popd
pushd typescript/src
node "$COMPONENTS_DIR"/content-service-api/typescript/patch-grpc-js.ts
popd
update_license