Skip to content

Commit eb1854a

Browse files
committed
trying the new crc32
1 parent acc8417 commit eb1854a

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

.github/workflows/hash-files.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,24 @@ on:
88
jobs:
99
hash-files:
1010
runs-on: windows-latest
11-
steps:
12-
- name: Fetch Simba 2 download URL
13-
id: simba-url
14-
run: |
15-
$url = "https://raw.githubusercontent.com/Villavu/Simba-Build-Archive/refs/heads/main/latest.win64"
16-
$response = Invoke-WebRequest -Uri $url -UseBasicParsing
17-
$baseUrl = $response.Content.Trim() -replace 'Win64\.zip\?raw=true$', ''
18-
Write-Output "Base URL: $baseUrl"
19-
echo "::set-output name=baseUrl::$baseUrl"
20-
New-Item -Path ".\Includes" -ItemType Directory
21-
22-
- name: Download Simba 2.0 (64-bit)
23-
run: |
24-
$baseUrl = "${{ steps.simba-url.outputs.baseUrl }}"
25-
$downloadUrl = "$baseUrl" + "Win64.zip?raw=true"
26-
Write-Output "Download URL (64-bit): $downloadUrl"
27-
$outputFile = ".\download.zip"
28-
Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile
29-
Expand-Archive -Path $outputFile -DestinationPath . -Force
30-
Remove-Item -Path $outputFile -Force
31-
11+
steps:
3212
- name: Checkout repository
3313
uses: actions/[email protected]
34-
with:
35-
path: ./wasp-data
3614

3715
- name: Hash all eligible files
3816
shell: bash
3917
run: |
40-
ls -a
41-
./Simba-Win64.exe --run ./wasp-data/tools/hash-files.simba
18+
shopt -s globstar
19+
for file in **/*; do
20+
[ -d "$file" ] && continue
21+
22+
[[ "$file" == .git/* || "$file" == .github/* || "$file" == tools/* ]] && continue
23+
[[ "$file" == "LICENSE" || "$file" == "README.md" ]] && continue
24+
[[ "$file" == *.hash ]] && continue
25+
26+
HASH=$(cksum "$file" | awk '{ print $1 }')
27+
echo "$HASH" > "$file.hash"
28+
done
4229
4330
- name: Commit hash files
4431
shell: bash

0 commit comments

Comments
 (0)