Skip to content

Commit

Permalink
Address "fatal: detected dubious ownership in repository"
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Grey committed Dec 1, 2023
1 parent 0ca37fe commit 3d29844
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ elif [[ $RUNNER_OS == "Windows" ]]; then
elif [[ "$RUNNER_OS" == 'Linux' ]]; then
echo "Docker arguments used: DOCKER_IMAGE=${DOCKER_IMAGE}, DOCKER_TAG=${DOCKER_TAG}, TARGET_ARCH=${TARGET_ARCH}"
# verification bypass of external dependencies
git config --global --add safe.directory "${GITHUB_WORKSPACE}/dependencies/external/*"
# set GitHub Container Registry url
REGISTRY_URL="ghcr.io/hyperion-project/${DOCKER_IMAGE}"
# take ownership of deploy dir
Expand All @@ -46,6 +45,7 @@ elif [[ "$RUNNER_OS" == 'Linux' ]]; then
-v "${GITHUB_WORKSPACE}:/source:rw" \
$REGISTRY_URL:$DOCKER_TAG \
/bin/bash -c "mkdir -p /source/build && cd /source/build &&
git config --global --add safe.directory '*' &&
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ../ || exit 2 &&
cmake --build /source/build --target package -- -j $(nproc) || exit 3 &&
cp /source/build/bin/h* /deploy/ 2>/dev/null || : &&
Expand Down
1 change: 1 addition & 0 deletions bin/scripts/docker-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ $DOCKER run --rm --platform=${PLATFORM_ARCHITECTURE} \
-v "${CODE_PATH}/:/source:rw" \
${REGISTRY_URL}/${DISTRIBUTION}:${CODENAME} \
/bin/bash -c "mkdir -p /source/${BUILD_DIR} && cd /source/${BUILD_DIR} &&
git config --global --add safe.directory '*' &&
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${PLATFORM} ${BUILD_ARGS} .. || exit 2 &&
make -j $(nproc) ${PACKAGES} || exit 3 || : &&
exit 0;
Expand Down
1 change: 0 additions & 1 deletion cmake/FindGitVersion.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
execute_process( COMMAND git config --global --add safe.directory ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ERROR_QUIET )
execute_process( COMMAND git log -1 --format=%cn-%t/%h-%ct WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_ID ERROR_QUIET )
execute_process( COMMAND sh -c "git branch | grep '^*' | sed 's;^*;;g' " WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE VERSION_ID ERROR_QUIET )
execute_process( COMMAND sh -c "git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_REMOTE_PATH ERROR_QUIET )
Expand Down

0 comments on commit 3d29844

Please sign in to comment.