Skip to content

Commit

Permalink
Update update-files-manifest.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sivan22 authored Nov 9, 2024
1 parent ebcbbbe commit fc5b946
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/update-files-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ jobs:

- name: Generate Files Manifest
run: |
find . \( -name "metadata.json" -o -path "./אוצריא/*" -o -path "./links/*" \) -type f \
echo "{" > files_manifest.json
find . \( -path "./metadata.json" -o -path "./אוצריא/*" -o -path "./links/*" \) -type f \
! -path "./.git/*" \
! -path "./.github/*" \
! -name "files_manifest.json" \
-exec sh -c 'path="${1#./}"; echo "{\"$path\": {\"hash\": \"$(sha256sum "$1" | cut -d" " -f1)\"}}"' sh {} \; | \
paste -sd "," - | \
(echo "{" && cat && echo "}") > files_manifest.json
-exec sh -c '
path="${1#./}"
hash=$(sha256sum "$1" | cut -d" " -f1)
echo "\"$path\": {\"hash\": \"$hash\"}"
' sh {} \; | sed "$ ! s/$/,/" >> files_manifest.json
echo "}" >> files_manifest.json
- name: Commit changes
uses: EndBug/add-and-commit@v9
Expand Down

0 comments on commit fc5b946

Please sign in to comment.