Skip to content

Commit

Permalink
Clean up comment about uid variable
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Dec 10, 2023
1 parent a4e5438 commit 87fb5a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ci/build-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ CMAKE_ARCH="${CMAKE_ARCH:-"$ARCH"}"
cwd="$PWD"
repo_root="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")"/..)"

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

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

# run the build with the current user to
# a) make sure root is not required for builds
# b) allow the build scripts to "mv" the binaries into the /out directory
uid="$(id -u)"

# mount workspace read-only, trying to make sure the build doesn't ever touch the source code files
# of course, this only works reliably if you don't run this script from that directory
# but it's still not the worst idea to do so
Expand Down

0 comments on commit 87fb5a0

Please sign in to comment.