File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 - name : Install dependencies
4545 run : pip install -e ".[dev]"
4646
47+ - name : Verify SOURCE_REF matches this commit
48+ run : bash scripts/check-source-ref.sh
49+
4750 - name : Verify sdk-signing fixtures match pinned spec
4851 env :
4952 INTENTPROOF_SPEC_DIR : intentproof-spec
Original file line number Diff line number Diff line change 1+ 62dc0738053fdab8d8a9178e0c7f674369599632
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Fail when SOURCE_REF does not match the current commit (tuple bookkeeping).
3+ set -euo pipefail
4+
5+ ROOT=" $( cd " $( dirname " $0 " ) /.." && pwd) "
6+ cd " $ROOT "
7+
8+ if [[ ! -f SOURCE_REF ]]; then
9+ echo " Missing SOURCE_REF in repository root" >&2
10+ exit 2
11+ fi
12+
13+ HEAD=" $( git rev-parse HEAD) "
14+ REF=" $( tr -d ' [:space:]' < SOURCE_REF) "
15+ if ! echo " $REF " | grep -qE ' ^[0-9a-f]{40}$' ; then
16+ echo " Invalid SOURCE_REF: must be a 40-character lowercase git SHA" >&2
17+ exit 1
18+ fi
19+
20+ if [[ " $HEAD " != " $REF " ]]; then
21+ echo " FAIL: SOURCE_REF ($REF ) does not match HEAD ($HEAD )" >&2
22+ echo " Update SOURCE_REF and bump spec matrix/pins after merging SDK changes." >&2
23+ exit 1
24+ fi
25+
26+ echo " PASS: SOURCE_REF matches HEAD ($HEAD )."
You can’t perform that action at this time.
0 commit comments