Make API deployment idempotent on staged repository
This commit is contained in:
parent
fed3c21d68
commit
f3cb08ecad
|
|
@ -17,7 +17,13 @@ command -v go >/dev/null 2>&1 || { echo 'Go is required on Debian' >&2; exit 1;
|
|||
|
||||
sudo install -d -m 0755 "${install_dir}" "${repo_root}" /etc/jeannie
|
||||
sudo cp infra/jeannie-temporal/docker-compose.yml "${install_dir}/docker-compose.yml"
|
||||
sudo cp -R . "${repo_root}/"
|
||||
current_repo="$(pwd -P)"
|
||||
target_repo="$(cd "${repo_root}" && pwd -P)"
|
||||
if [[ "${current_repo}" != "${target_repo}" ]]; then
|
||||
sudo cp -R . "${repo_root}/"
|
||||
else
|
||||
echo "Repository already staged at ${repo_root}; skipping self-copy."
|
||||
fi
|
||||
sudo chown -R "$(id -u):$(id -g)" "${repo_root}"
|
||||
|
||||
if command -v ss >/dev/null 2>&1 &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue