Skip to content

Commit 9fde4b7

Browse files
hoytakseanses
andauthored
Fix breaking build changes due to git safety checks. (#530)
Fix build break due to git safety checks. The recent logging PR added the automatic logging of the git repository commit hash that was used to build the wheel. However, this requires querying for this hash at build time, which requires running git. It turns out that in the CI, the user checking out the repository and the user building the wheel are different, which makes git upset. This PR adds code to tell git everything will be ok. --------- Co-authored-by: di <[email protected]>
1 parent 69f23d6 commit 9fde4b7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/pre-release-testing.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
cd ${{ matrix.target-repo }}
4646
git config user.name "Hugging Face Bot (Xet RC Testing)"
4747
git config user.email "[email protected]"
48-
4948
- name: Wait for prerelease to be out on PyPI
5049
run: |
5150
VERSION=${{ steps.get-version.outputs.VERSION }}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
echo "Neither apt-get nor yum is installed. Please install a package manager."
7272
exit 1
7373
fi
74+
git config --global --add safe.directory "*"
7475
- name: Strip debug symbols into a separate file
7576
if: env.IS_RELEASE == 'true'
7677
run: |
@@ -151,6 +152,8 @@ jobs:
151152
sccache: 'true'
152153
manylinux: musllinux_1_2
153154
working-directory: hf_xet
155+
before-script-linux: |
156+
git config --global --add safe.directory "*"
154157
- name: Strip debug symbols into a separate file
155158
if: env.IS_RELEASE == 'true'
156159
run: |

0 commit comments

Comments
 (0)