-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdbuild-ci.sh
More file actions
executable file
·47 lines (38 loc) · 1.57 KB
/
dbuild-ci.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.57 KB
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
38
39
40
41
42
43
44
45
46
47
#!/bin/sh
#
# dbuild CI wrapper (backward-compatibility shim)
#
# This script now delegates to `dbuild ci-run`. It is kept for
# repos that still reference dbuild-ci.sh directly.
#
# Usage: sh dbuild-ci.sh [VARIANT]
#
# Env vars:
# DBUILD_REF - override the dbuild version to fetch (default: main)
# DBUILD_PATH - explicit path to dbuild checkout (skips fetch)
# GITHUB_TOKEN - registry authentication
# GITHUB_ACTOR - registry username (optional)
#
set -e
DBUILD_REF="${DBUILD_REF:-main}"
# ── Locate dbuild ────────────────────────────────────────────────────
if [ -n "$DBUILD_PATH" ] && [ -d "$DBUILD_PATH/dbuild" ]; then
DBUILD_DIR="$DBUILD_PATH"
elif [ -d "../dbuild/dbuild" ]; then
DBUILD_DIR="$(cd ../dbuild && pwd)"
else
echo "Fetching dbuild ${DBUILD_REF}..."
mkdir -p /tmp/dbuild
fetch -qo /tmp/dbuild.tar.gz \
"https://github.com/daemonless/dbuild/archive/${DBUILD_REF}.tar.gz"
tar -xzf /tmp/dbuild.tar.gz -C /tmp/dbuild --strip-components=1
DBUILD_DIR="/tmp/dbuild"
fi
export PYTHONPATH="$DBUILD_DIR"
# ── Variant filter (optional) ────────────────────────────────────────
VARIANT_FLAG=""
if [ -n "$1" ]; then
VARIANT_FLAG="--variant $1"
fi
# ── Delegate to dbuild ci-run ────────────────────────────────────────
exec python3 -m dbuild ci-run $VARIANT_FLAG