Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67f3532938 | ||
|
|
1d8dfce99a |
+19
-2
@@ -45,8 +45,20 @@ get_token() {
|
|||||||
if [ -n "$tok" ]; then echo "$tok"; return; fi
|
if [ -n "$tok" ]; then echo "$tok"; return; fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
read -rsp "Gitea personal access token (repo write): " GITEA_TOKEN
|
# Fall back to the git credential store: tea's OAuth login stores an access
|
||||||
echo "$GITEA_TOKEN"
|
# token as the password for every push to this remote, and Gitea accepts it
|
||||||
|
# for API auth (Authorization: token <access_token>).
|
||||||
|
local host cred
|
||||||
|
host="${GITEA_SERVER#*://}"
|
||||||
|
cred="$(printf 'protocol=https\nhost=%s\n\n' "$host" \
|
||||||
|
| git credential fill 2>/dev/null | sed -n 's/^password=//p' | head -1 || true)"
|
||||||
|
if [ -n "$cred" ]; then echo "$cred"; return; fi
|
||||||
|
# Fail fast — continuing without a token fails only at the upload step,
|
||||||
|
# after the whole build has run.
|
||||||
|
echo "error: no Gitea token found" >&2
|
||||||
|
echo " set GITEA_TOKEN, or run 'tea login' / 'git push' once so the" >&2
|
||||||
|
echo " credential store has an entry for $host" >&2
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
GITEA_TOKEN="$(get_token)"
|
GITEA_TOKEN="$(get_token)"
|
||||||
@@ -112,6 +124,8 @@ echo ">> Building PostgreSQL client tools..."
|
|||||||
mkdir -p "$OUT_PG"
|
mkdir -p "$OUT_PG"
|
||||||
PG_VER="16.4"
|
PG_VER="16.4"
|
||||||
curl -fsSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.bz2" -o /tmp/pg.tar.bz2
|
curl -fsSL "https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.bz2" -o /tmp/pg.tar.bz2
|
||||||
|
# Idempotent re-runs: clear stale build dirs left by previous invocations.
|
||||||
|
rm -rf "/tmp/postgresql-${PG_VER}" /tmp/pgbuild
|
||||||
tar -xf /tmp/pg.tar.bz2 -C /tmp
|
tar -xf /tmp/pg.tar.bz2 -C /tmp
|
||||||
cd /tmp/postgresql-${PG_VER}
|
cd /tmp/postgresql-${PG_VER}
|
||||||
ac_cv_func_strchrnul=no ./configure --prefix=/tmp/pgbuild --without-readline --without-icu CFLAGS="-O2"
|
ac_cv_func_strchrnul=no ./configure --prefix=/tmp/pgbuild --without-readline --without-icu CFLAGS="-O2"
|
||||||
@@ -137,6 +151,9 @@ done
|
|||||||
echo ">> Building MariaDB client tools..."
|
echo ">> Building MariaDB client tools..."
|
||||||
mkdir -p "$OUT_MY"
|
mkdir -p "$OUT_MY"
|
||||||
MARIADB_VER="11.4.5"
|
MARIADB_VER="11.4.5"
|
||||||
|
# Idempotent re-runs: git clone fails if the destination is non-empty (e.g.
|
||||||
|
# left over from an earlier build on the same machine). Clean it first.
|
||||||
|
rm -rf /tmp/mariadb-server
|
||||||
git clone --depth 1 --branch "mariadb-${MARIADB_VER}" https://github.com/MariaDB/server.git /tmp/mariadb-server
|
git clone --depth 1 --branch "mariadb-${MARIADB_VER}" https://github.com/MariaDB/server.git /tmp/mariadb-server
|
||||||
cd /tmp/mariadb-server
|
cd /tmp/mariadb-server
|
||||||
if [ "$(uname -m)" = arm64 ]; then
|
if [ "$(uname -m)" = arm64 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user