bazel: command to prepare development workspace (#1425)

This command symlinks all binaries into the current working directory (or the path specified by the first argument)

* bazel: command to prepare development workspace
* bazel: set malt3 as codeowner
This commit is contained in:
Malte Poll 2023-03-14 13:57:39 +01:00 committed by GitHub
parent e4b5ef0ed4
commit a73cdb9b14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 86 additions and 3 deletions

View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# This script is run from the user's Constellation workspace (BUILD_WORKING_DIRECTORY).
# It prepares the workspace by symlinking all required binaries into folder.
lib=$(realpath @@BASE_LIB@@) || exit 1
bootstrapper=$(realpath @@BOOTSTRAPPER@@) || exit 1
upgrade_agent=$(realpath @@UPGRADE_AGENT@@) || exit 1
cli=$(realpath @@CLI@@) || exit 1
cdbg=$(realpath @@CDBG@@) || exit 1
# shellcheck source=../ci/lib.bash
if ! source "${lib}"; then
echo "Error: could not find import"
exit 1
fi
cd "${BUILD_WORKING_DIRECTORY}" || exit 1
if [[ $# -eq 0 ]] ; then
workdir="."
else
workdir="$1"
fi
ln -sf "${bootstrapper}" "${workdir}/bootstrapper"
ln -sf "${upgrade_agent}" "${workdir}/upgrade-agent"
ln -sf "${cli}" "${workdir}/constellation"
ln -sf "${cdbg}" "${workdir}/cdbg"