mirror of
https://github.com/ankitects/anki.git
synced 2026-09-10 07:29:19 -04:00
Two build fixes found while getting the build working on FreeBSD.
1. **Remove hardcoded `#!/bin/bash` paths and use /usr/bin/env instead
/**
2. **env_remove("YARN_BINARY")**
Tested on FreeBSD 16.0-CURRENT amd64.
A second series adds FreeBSD support with `platform` variants,
environment overrides, PyQt6 handling and docs.
Closes #5301
24 lines
503 B
Bash
Executable File
24 lines
503 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
html="$1"
|
|
|
|
outdir="out/coverage/typescript"
|
|
YARN="out/extracted/node/bin/yarn"
|
|
|
|
mkdir -p "$outdir"
|
|
|
|
"$YARN" vitest:once \
|
|
--coverage.enabled true \
|
|
--coverage.provider=v8 \
|
|
--coverage.reporter=text-summary \
|
|
--coverage.reporter=json-summary \
|
|
${html:+--coverage.reporter=html} \
|
|
--coverage.reportsDirectory="../$outdir" \
|
|
--coverage.thresholds.lines=5
|
|
|
|
if [ "$html" = "--html" ]; then
|
|
echo "TypeScript coverage report: $outdir/index.html"
|
|
fi
|