Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/public-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
13
# include protoc bash functions
14
# shellcheck disable=SC1090,SC1091
15
source "$ROOT_DIR"/scripts/protoc-generator.sh
16
17
pushd "go"
18
go install github.com/gitpod-io/gitpod/components/public-api/go/protoc-proxy-gen
19
popd
20
21
install_dependencies
22
23
lint
24
25
# Format all proto files
26
buf format -w
27
28
# Run breaking change detector
29
buf breaking --against "https://github.com/gitpod-io/gitpod.git#branch=main,subdir=components/public-api"
30
31
# Remove generated files, so they are re-created
32
rm -rf go/experimental
33
rm -rf java/src/main/java
34
35
protoc_buf_generate
36
37
update_license
38
39
git ls-files -- 'java/**/*.java' 'java/**/*.kt' | xargs pre-commit run trailing-whitespace --files || true
40
41
# Run end-of-file-fixer
42
git ls-files -- 'typescript/*.ts' | xargs pre-commit run end-of-file-fixer --files || true
43
44
yarn --cwd typescript build
45
46