Browse Source

fix: update git hooks and git ignore file

master
Dennis Buchhorn 2 years ago
parent
commit
b538ae0220
2 changed files with 2 additions and 13 deletions
  1. +0
    -10
      .githooks/post-checkout
  2. +2
    -3
      .gitignore

+ 0
- 10
.githooks/post-checkout View File

@ -2,8 +2,6 @@
repoRoot=$(git rev-parse --show-toplevel) repoRoot=$(git rev-parse --show-toplevel)
listFilesToSubstitute=$(find -name *.gitsubstitute) listFilesToSubstitute=$(find -name *.gitsubstitute)
listStaticPathFiles=$(git grep -lr --untracked $repoRoot)
listStagedFiles=$(git diff --staged --name-only)
staticPathSubstitution="\$\$\${GITSUBSTITUTE_REPO_ROOT}" staticPathSubstitution="\$\$\${GITSUBSTITUTE_REPO_ROOT}"
@ -14,11 +12,3 @@ for entryFileToSubstitute in $listFilesToSubstitute; do
fileContent=$(<$fullPath) fileContent=$(<$fullPath)
echo "${fileContent//${staticPathSubstitution}/${repoRoot}}" > "${fullPathSubstitute}" echo "${fileContent//${staticPathSubstitution}/${repoRoot}}" > "${fullPathSubstitute}"
done done
mv hw_platform/platform.tcl TMP1
mv hw_platform/platform.tcl.gitsubstitute TMP2
rm -rf hw_platform
mkdir hw_platform
mv TMP1 hw_platform/platform.tcl
mv TMP2 hw_platform/platform.tcl.gitsubstitute
xsct hw_platform/platform.tcl

+ 2
- 3
.gitignore View File

@ -18,9 +18,8 @@ vitis_pid*.str
# ignore all files generated by pre-commit hook # ignore all files generated by pre-commit hook
**/*.gitsubstitute **/*.gitsubstitute
# ignore all generated platform files but platform setup script
/hw_platform/*
!/hw_platform/platform.tcl
# ignore all generated platform files
/hw_platform/
# ignore ide scripts # ignore ide scripts
/*_system/_ide/scripts/* /*_system/_ide/scripts/*

Loading…
Cancel
Save