Skyvern/.github/actions/setup-ai-env/uv-sync.sh
LawyZheng 9de05b2c03
fix: prevent country code duplication in phone format checker (SKY-8395) (#5125)
Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 18:12:58 +08:00

21 lines
619 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Build uv sync command with optional --group flags from UV_SYNC_GROUPS env var.
# UV_SYNC_GROUPS: comma-separated list of groups (whitespace trimmed, empty entries ignored).
args=(sync)
if [[ -n "${UV_SYNC_GROUPS:-}" ]]; then
IFS=',' read -ra raw_groups <<< "$UV_SYNC_GROUPS"
for group in "${raw_groups[@]}"; do
# Trim leading/trailing whitespace
group="${group#"${group%%[![:space:]]*}"}"
group="${group%"${group##*[![:space:]]}"}"
if [[ -n "$group" ]]; then
args+=(--group "$group")
fi
done
fi
uv "${args[@]}"