Pudong c0d6fa978d
[gitpod-cli] change gp rebuild to gp validate (#16867)
* [gitpod-cli] change `gp rebuild` to `gp validate`

* fix `await-port` and `forward-port` command backward compatible

* Change the reference to `gp rebuild`

* update `gitpod-web` extension ref 3b076b9103
2023-03-17 06:51:08 +01:00

31 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Copyright (c) 2023 Gitpod GmbH. All rights reserved.
# Licensed under the GNU Affero General Public License (AGPL).
# See License.AGPL.txt in the project root for license information.
set -Eeuo pipefail
ROOT_DIR="$(realpath "$(dirname "$0")/../..")"
bash "$ROOT_DIR/components/gitpod-cli/rebuild.sh"
bash "$ROOT_DIR/components/ide/code/codehelper/rebuild.sh"
DIR="$(dirname "$(realpath "$0")")"
COMPONENT="$(basename "$DIR")"
cd "$DIR"
# build
go build -gcflags=all="-N -l" .
echo "$COMPONENT built"
sudo rm -rf "/.supervisor/$COMPONENT" && true
sudo mv ./"$COMPONENT" /.supervisor
echo "$COMPONENT in /.supervisor replaced"
yarn --cwd "$DIR/frontend" run build
sudo rm -rf /.supervisor/frontend && true
sudo ln -s "$DIR/frontend/dist" /.supervisor/frontend
echo "$DIR/frontend/dist linked in /.supervisor/frontend"
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=" "$@"