Merge pull request #13527 from ethereum/git-safe-directory-workaround

Add git `safe.directory` workaround in emscripten build script
This commit is contained in:
Kamil Śliwak 2022-10-21 15:47:42 +02:00 committed by GitHub
commit 9800e19df6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -35,6 +35,8 @@ else
fi
# solbuildpackpusher/solidity-buildpack-deps:emscripten-13
# NOTE: Without `safe.directory` git would assume it's not safe to operate on /root/project since it's owned by a different user.
# See https://github.blog/2022-04-12-git-security-vulnerability-announced/
docker run -v "$(pwd):/root/project" -w /root/project \
solbuildpackpusher/solidity-buildpack-deps@sha256:f1c13f3450d1f2e53ea18ac1ac1a17e932573cb9a5ccd0fd9ef6dd44f6402fa9 \
./scripts/ci/build_emscripten.sh "$BUILD_DIR"
/bin/bash -c "git config --global --add safe.directory /root/project && ./scripts/ci/build_emscripten.sh $BUILD_DIR"

View File

@ -40,12 +40,9 @@ else
BUILD_DIR="$1"
fi
apt-get update
apt-get install lz4 --no-install-recommends
WORKSPACE=/root/project
cd $WORKSPACE
cd "$WORKSPACE"
# shellcheck disable=SC2166
if [[ "$CIRCLE_BRANCH" = release || -n "$CIRCLE_TAG" || -n "$FORCE_RELEASE" || "$(git tag --points-at HEAD 2>/dev/null)" == v* ]]