Skip to content

Commit 87fb5a0

Browse files
committed
Clean up comment about uid variable
1 parent a4e5438 commit 87fb5a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ci/build-in-docker.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ CMAKE_ARCH="${CMAKE_ARCH:-"$ARCH"}"
3131
cwd="$PWD"
3232
repo_root="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")"/..)"
3333

34-
# needed to keep user ID in and outside Docker in sync to be able to write to workspace directory
35-
uid="$(id -u)"
3634
image=zsync2-build:"$ARCH"
3735

3836
# building local image to "cache" installed dependencies for subsequent builds
@@ -47,6 +45,11 @@ docker build \
4745
tty_args=()
4846
if [ -t 0 ]; then tty_args+=("-t"); fi
4947

48+
# run the build with the current user to
49+
# a) make sure root is not required for builds
50+
# b) allow the build scripts to "mv" the binaries into the /out directory
51+
uid="$(id -u)"
52+
5053
# mount workspace read-only, trying to make sure the build doesn't ever touch the source code files
5154
# of course, this only works reliably if you don't run this script from that directory
5255
# but it's still not the worst idea to do so

0 commit comments

Comments
 (0)