#!/usr/bin/env bash
set -euo pipefail

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

export UPDATE_APPLE_FIXTURES=1
if [ -n "${WSLENV-}" ]; then
  export WSLENV="${WSLENV}:UPDATE_APPLE_FIXTURES/up"
else
  export WSLENV="UPDATE_APPLE_FIXTURES/up"
fi

touch "$ROOT_DIR/src/StellaOps.Feedser.Source.Vndr.Apple.Tests/Apple/Fixtures/.update-apple-fixtures"
( cd "$ROOT_DIR" && dotnet test "src/StellaOps.Feedser.Source.Vndr.Apple.Tests/StellaOps.Feedser.Source.Vndr.Apple.Tests.csproj" "$@" )
