Skip to content

Commit 92e42c0

Browse files
committed
Use docker to setup file ownerships
1 parent aa7615d commit 92e42c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

standalone-contract/scripts/reproducible_build_docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ if [[ "${SUDO}" = "yes" ]]; then
6262
PREFIX="sudo"
6363
fi
6464

65-
$PREFIX $DOCKER run --rm $PROXY_ARGS -v `pwd`:/code $DOCKER_IMAGE make $TASKS
65+
$PREFIX $DOCKER run --rm $DOCKER_RUN_ARGS $PROXY_ARGS -v `pwd`:/code $DOCKER_IMAGE make $TASKS
6666
# Reset file ownerships for all files docker might touch
67-
sudo chown -R -f `id -u`:`id -g` checksums.txt build target
67+
$PREFIX $DOCKER run --rm $DOCKER_RUN_ARGS $PROXY_ARGS -e UID=`id -u` -e GID=`id -g` -v `pwd`:/code $DOCKER_IMAGE bash -c 'chown -R -f $UID:$GID checksums.txt build target'
6868

6969
if [[ "${UPDATE}" = "yes" ]]; then
7070
echo "${CHECKSUM_FILE_PATH} file is updated with latest binary hashes!"

workspace/scripts/reproducible_build_docker

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ if [[ "${SUDO}" = "yes" ]]; then
6262
PREFIX="sudo"
6363
fi
6464

65-
$PREFIX $DOCKER run --rm $PROXY_ARGS -v `pwd`:/code $DOCKER_IMAGE make $TASKS
65+
$PREFIX $DOCKER run --rm $DOCKER_RUN_ARGS $PROXY_ARGS -v `pwd`:/code $DOCKER_IMAGE make $TASKS
6666
# Reset file ownerships for all files docker might touch
67-
sudo chown -R -f `id -u`:`id -g` checksums.txt build target
67+
$PREFIX $DOCKER run --rm $DOCKER_RUN_ARGS $PROXY_ARGS -e UID=`id -u` -e GID=`id -g` -v `pwd`:/code $DOCKER_IMAGE bash -c 'chown -R -f $UID:$GID checksums.txt build target'
6868

6969
if [[ "${UPDATE}" = "yes" ]]; then
7070
echo "${CHECKSUM_FILE_PATH} file is updated with latest binary hashes!"

0 commit comments

Comments
 (0)