Skip to content

Commit

Permalink
[+] git sparse-checkout set ""
Browse files Browse the repository at this point in the history
  • Loading branch information
Azathothas committed Oct 28, 2024
1 parent ed572b3 commit 2832d4b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/hf_gen_meta_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ echo -e "\n\n [+] Started Metadata Update at :: $(TZ='UTC' date +'%A, %Y-%m-%d (
huggingface-cli login --token "${HF_TOKEN}" --add-to-git-credential
#Clone
pushd "$(mktemp -d)" >/dev/null 2>&1 && git clone --depth="1" --filter="blob:none" --no-checkout "https://huggingface.co/datasets/Azathothas/Toolpacks-Extras" && cd "./Toolpacks-Extras"
git sparse-checkout set "." && git checkout
git sparse-checkout set "" && git checkout
HF_REPO_LOCAL="$(realpath .)" && export HF_REPO_LOCAL="${HF_REPO_LOCAL}"
git lfs install
huggingface-cli lfs-enable-largefiles "."
Expand All @@ -167,7 +167,7 @@ if jq --exit-status . "${TMPDIR}/METADATA.json.bak" >/dev/null 2>&1; then
cat "${TMPDIR}/METADATA.json.bak" | jq -s '.' | jq 'walk(if type == "string" and . == "null" then "" else . end)' > "${TMPDIR}/METADATA.json"
#Sync
pushd "${HF_REPO_LOCAL}" >/dev/null 2>&1
git sparse-checkout disable
git sparse-checkout set ""
git sparse-checkout set --no-cone --sparse-index "${HOST_TRIPLET}/*.json" "${HOST_TRIPLET}/*.log" "${HOST_TRIPLET}/*.png" "${HOST_TRIPLET}/*.temp" "${HOST_TRIPLET}/*.toml" "${HOST_TRIPLET}/*.tmp" "${HOST_TRIPLET}/*.txt" "${HOST_TRIPLET}/*.yaml" "${HOST_TRIPLET}/*.yml"
git checkout ; ls -lah "." "./${HOST_TRIPLET}"
find "${HF_REPO_LOCAL}" -type f -size -3c -delete
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/hf_git_ops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pushd "$(mktemp -d)" >/dev/null 2>&1 && git clone --depth="1" --filter="blob:non
HF_REPO_LOCAL="$(realpath .)" && export HF_REPO_LOCAL="${HF_REPO_LOCAL}"
HF_REPO_PKGDIR="$(realpath ${HF_REPO_LOCAL})/${HOST_TRIPLET}" && export HF_REPO_PKGDIR="${HF_REPO_PKGDIR}"
mkdir -p "${HF_REPO_PKGDIR}" ; git fetch origin main ; git lfs track "./${HOST_TRIPLET}/**"
git sparse-checkout disable
git sparse-checkout set ""
git sparse-checkout set --no-cone --sparse-index "/METADATA.json" \
"${HOST_TRIPLET}/*.json" "${HOST_TRIPLET}/*.log" "${HOST_TRIPLET}/*.temp" "${HOST_TRIPLET}/*.tmp" "${HOST_TRIPLET}/*.txt" "${HOST_TRIPLET}/*.yaml" "${HOST_TRIPLET}/*.yml"
git checkout ; ls -lah "." "./${HOST_TRIPLET}"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/hf_toolpacks_devenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ hf_clone_repo()
HF_REPO_PKGDIR="$(realpath ${HF_REPO_LOCAL})/${HOST_TRIPLET}" && export HF_REPO_PKGDIR="${HF_REPO_PKGDIR}"
mkdir -p "${HF_REPO_PKGDIR}" ; git fetch origin main ; git lfs track "./${HOST_TRIPLET}/**"
#Fetch REQUIRED Files
git sparse-checkout disable
git sparse-checkout set ""
git sparse-checkout set --no-cone --sparse-index \
"/METADATA.json" \
"${HOST_TRIPLET}/*.json" \
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/healthchecks_housekeeping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ jobs:
git lfs install
huggingface-cli lfs-enable-largefiles "." ; df -h
git fetch origin main ; git lfs track "./FLATPAK_APPSTREAM.xml" "./FLATPAK_APPS_INFO.txt" "./FLATPAK_APP_IDS.txt" "./METADATA.json" "./METADATA.min.json" "./METADATA.yaml" "./METADATA.min.yaml"
git sparse-checkout disable
git sparse-checkout set ""
git sparse-checkout set --no-cone --sparse-index "/FLATPAK_APPSTREAM.xml" "/FLATPAK_APPS_INFO.txt" "/FLATPAK_APP_IDS.txt" "/METADATA.json" "/METADATA.min.json" "/METADATA.yaml" "/METADATA.min.yaml"
git checkout ; ls -lah "."
cat "${GITHUB_WORKSPACE}/main/FLATPAK_APPSTREAM.xml" > "./FLATPAK_APPSTREAM.xml"
Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
pushd "$(mktemp -d)" >/dev/null 2>&1 && git clone --depth="1" --filter="blob:none" --no-checkout "https://huggingface.co/datasets/Azathothas/Toolpacks-Extras" && cd "./Toolpacks-Extras"
git lfs install
huggingface-cli lfs-enable-largefiles "." ; df -h
git sparse-checkout disable
git sparse-checkout set ""
git sparse-checkout set --no-cone --sparse-index "aarch64-Linux/*.json" "aarch64-Linux/*.log" "aarch64-Linux/*.png" "aarch64-Linux/*.temp" "aarch64-Linux/*.toml" "aarch64-Linux/*.tmp" "aarch64-Linux/*.txt" "aarch64-Linux/*.yaml" "aarch64-Linux/*.yml"
git checkout ; ls -lah "." "./aarch64-Linux"
git sparse-checkout list
Expand Down Expand Up @@ -571,7 +571,7 @@ jobs:
pushd "$(mktemp -d)" >/dev/null 2>&1 && git clone --depth="1" --filter="blob:none" --no-checkout "https://huggingface.co/datasets/Azathothas/Toolpacks-Extras" && cd "./Toolpacks-Extras"
git lfs install
huggingface-cli lfs-enable-largefiles "." ; df -h
git sparse-checkout disable
git sparse-checkout set ""
git sparse-checkout set --no-cone --sparse-index "x86_64-Linux/*.json" "x86_64-Linux/*.log" "x86_64-Linux/*.png" "x86_64-Linux/*.temp" "x86_64-Linux/*.toml" "x86_64-Linux/*.tmp" "x86_64-Linux/*.txt" "x86_64-Linux/*.yaml" "x86_64-Linux/*.yml"
git checkout ; ls -lah "." "./x86_64-Linux"
git sparse-checkout list
Expand Down

0 comments on commit 2832d4b

Please sign in to comment.