Skip to content

Commit f0bd79a

Browse files
committed
Ensure shasum uses binary mode
All files whose checksums are computed here are binary files, and even if `shasum` were to behave the same, it omits the `*` prefix in front of the filename that allows humans and tools to know for sure that it was binary mode unless `--binary` is passed.
1 parent aae0fe2 commit f0bd79a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ jobs:
208208
file -- "$TARGET_DIR"/release/{ein,gix}.exe
209209
cp -- "$TARGET_DIR"/release/{ein,gix}.exe "$ARCHIVE/"
210210
7z a "$ARCHIVE.zip" "$ARCHIVE"
211-
/usr/bin/core_perl/shasum --algorithm=256 "$ARCHIVE.zip" > "$ARCHIVE.zip.sha256"
211+
/usr/bin/core_perl/shasum --algorithm=256 --binary "$ARCHIVE.zip" > "$ARCHIVE.zip.sha256"
212212
echo "ASSET=$ARCHIVE.zip" >> "$GITHUB_ENV"
213213
echo "ASSET_SUM=$ARCHIVE.zip.sha256" >> "$GITHUB_ENV"
214214
@@ -218,7 +218,7 @@ jobs:
218218
file -- "$TARGET_DIR"/release/{ein,gix}
219219
cp -- "$TARGET_DIR"/release/{ein,gix} "$ARCHIVE/"
220220
tar czf "$ARCHIVE.tar.gz" "$ARCHIVE"
221-
shasum --algorithm=256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
221+
shasum --algorithm=256 --binary "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
222222
echo "ASSET=$ARCHIVE.tar.gz" >> "$GITHUB_ENV"
223223
echo "ASSET_SUM=$ARCHIVE.tar.gz.sha256" >> "$GITHUB_ENV"
224224
@@ -283,7 +283,7 @@ jobs:
283283
- name: Build archive
284284
run: |
285285
tar czf "$ARCHIVE.tar.gz" "$ARCHIVE"
286-
shasum --algorithm=256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
286+
shasum --algorithm=256 --binary "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
287287
echo "ASSET=$ARCHIVE.tar.gz" >> "$GITHUB_ENV"
288288
echo "ASSET_SUM=$ARCHIVE.tar.gz.sha256" >> "$GITHUB_ENV"
289289

0 commit comments

Comments
 (0)