#!/usr/bin/env bash

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"

workspaces=(
  iam
  apigateway
  creditservice
  deployer
  fiberlb
  flashdns
  k8shost
  lightningstor
  plasmavmc
  prismnet
)

cd "${REPO_ROOT}"

for ws in "${workspaces[@]}"; do
  echo "== ${ws} =="
  cargo generate-lockfile --manifest-path "${ws}/Cargo.toml"
done
