Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/supervisor/local-hot-swap.sh
2492 views
1
#!/bin/bash
2
# Copyright (c) 2022 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
# This script swaps the backend startup endpoint with a built one
9
# in a workspace and restarts the JB backend.
10
11
component=${PWD##*/}
12
13
# build
14
go build .
15
echo "$component built"
16
17
sudo rm /.supervisor/supervisor && true
18
sudo mv ./"$component" /.supervisor
19
echo "Local Swap complete"
20
21