Add git safe.directory workaround in emscripten build script

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
Rodrigo Q. Saramago 2022-09-14 11:22:21 +02:00
parent f808855329
commit 9dbc3e0b82
No known key found for this signature in database
GPG Key ID: 9B36B2525704A359
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* ]]