23 lines
556 B
Bash
Executable File
23 lines
556 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
root_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
|
credential_dir=
|
|
cleanup() {
|
|
if [[ -n $credential_dir ]]; then
|
|
rm -rf -- "$credential_dir"
|
|
fi
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
if [[ -n ${ECHOION_COMPONENT_SSH_KEY:-} ]]; then
|
|
# shellcheck source=scripts/lib/component-ssh.sh
|
|
source "$root_dir/scripts/lib/component-ssh.sh"
|
|
credential_dir=$(mktemp -d)
|
|
umask 077
|
|
echoion_configure_component_ssh \
|
|
"$credential_dir" "$ECHOION_COMPONENT_SSH_KEY"
|
|
fi
|
|
|
|
python3 "${root_dir}/scripts/prepare_release.py" "$@"
|