blob: 7393be1ad09000ca36a64b35e7d3414dd9e1c74c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
set -e -u -o pipefail
debug() {
if [[ ${LIBYAML_DEBUG_PIN-} ]]; then
echo "[DEBUG] $*" >&2
fi
}
warn() {
echo "$*" >&2
}
tail -n+2 conf/pin.tsv |
tac |
(
while read -r commit_master commit_code commit_data; do
line="$commit_master $commit_code $commit_data"
debug "Line '$line'"
debug "Checking commit '$commit_master'"
debug "cd ../..; git merge-base --is-ancestor $commit_master HEAD"
if (cd ../..; git merge-base --is-ancestor "$commit_master" HEAD 2>/dev/null); then
echo "$line"
exit
else
debug "Not found"
fi
done
warn 'WARNING: No repository pinning found for libyaml/yaml-test-suite testing.'
warn 'WARNING: Defaulting to HEAD...'
echo -e "HEAD\tHEAD\tHEAD"
)
|