16 lines · 730 B · ShellRaw
#!/usr/bin/env bash# Warm every pin (including transitive sources and binary artifact archives)# before a cut. Safe to repeat; already-cached pins never update their remotes.# Usage: bash scripts/warm-swiftpm-cache.sh [package-directory]set -euo pipefailHERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"APP="${1:-$HERE/../apps/cotton}"APP="$(cd "$APP" && pwd)". "$HERE/lib/swiftpm-cache.sh"cotton_retain_swiftpm_cacheif [ "$APP" = "$(cd "$HERE/../apps/cotton" && pwd)" ]; then bash "$HERE/ffi-stub.sh"fiswift package --package-path "$APP" --cache-path "$(cotton_swiftpm_cache)" \ --scratch-path "$(cotton_swiftpm_cache)/resolved/$(cotton_swiftpm_key "$APP")" \ --skip-update --force-resolved-versions resolve