Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/supervisor/validate.sh
2492 views
1
#!/bin/bash
2
# Copyright (c) 2023 Gitpod GmbH. All rights reserved.
3
# Licensed under the GNU Affero General Public License (AGPL).
4
# See License.AGPL.txt in the project root for license information.
5
6
set -Eeuo pipefail
7
8
ROOT_DIR="$(realpath "$(dirname "$0")/../..")"
9
bash "$ROOT_DIR/components/gitpod-cli/rebuild.sh"
10
bash "$ROOT_DIR/components/ide/code/codehelper/rebuild.sh"
11
12
DIR="$(dirname "$(realpath "$0")")"
13
COMPONENT="$(basename "$DIR")"
14
cd "$DIR"
15
16
# build
17
go build -gcflags=all="-N -l" .
18
echo "$COMPONENT built"
19
20
sudo rm -rf "/.supervisor/$COMPONENT" && true
21
sudo mv ./"$COMPONENT" /.supervisor
22
echo "$COMPONENT in /.supervisor replaced"
23
24
yarn --cwd "$DIR/frontend" run build
25
26
sudo rm -rf /.supervisor/frontend && true
27
sudo ln -s "$DIR/frontend/dist" /.supervisor/frontend
28
echo "$DIR/frontend/dist linked in /.supervisor/frontend"
29
30
gp validate --workspace-folder="$ROOT_DIR/dev/ide/example/workspace" --gitpod-env "GITPOD_ANALYTICS_SEGMENT_KEY=YErmvd89wPsrCuGcVnF2XAl846W9WIGl" --gitpod-env "GP_OPEN_EDITOR=" --gitpod-env "GP_PREVIEW_BROWSER=" --gitpod-env "GP_EXTERNAL_BROWSER=" "$@"
31
32