summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-23 11:54:30 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-23 11:54:30 +0200
commit16ca0a48288005ea643456f5f6563355235a5839 (patch)
tree3bcdbc6e3e9df938956892b4e37c5c1e3704ff9d /scripts
parent8dc2e7d2f11aee4e70c3675e4ba6dd255a47e0e4 (diff)
downloadbokf-0.1.70.tar.gz
bokf-0.1.70.zip
deploy: run the cross build as the invoking userv0.1.70
The locale directory the cross build now copies came out root-owned, so deploy.sh could not remove .prebuilt and stopped before switching the containers. Running the container with the caller's uid keeps the output deletable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deploy.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index 29e477f..c34cb4a 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -68,8 +68,10 @@ cross_build() {
rm -rf .prebuilt
mkdir -p .prebuilt
docker build -q -f deploy/Dockerfile.cross -t bokf-cross deploy/ >/dev/null
- docker run --rm -e "VERSION=$TAG" -v "$PWD":/src:ro \
- -v "$PWD/.prebuilt":/out bokf-cross
+ # as the invoking user: the output (binaries, locale data) stays
+ # deletable here
+ docker run --rm --user "$(id -u):$(id -g)" -e "VERSION=$TAG" \
+ -v "$PWD":/src:ro -v "$PWD/.prebuilt":/out bokf-cross
if command -v file >/dev/null 2>&1 &&
! file .prebuilt/bokfd | grep -q aarch64; then
echo "deploy: cross-build produced no arm64 binary" >&2