File tree 1 file changed +25
-1
lines changed
1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,32 @@ runs:
161
161
fi
162
162
163
163
# Try to verify the downloaded binary
164
- if ! grep "${platform_filename}" coveralls-checksums.txt | sha256sum -c; then
164
+ # if ! grep "${platform_filename}" coveralls-checksums.txt | sha256sum -c; then
165
+ # echo "Checksum verification failed (Linux)."
166
+ # [ "${{ inputs.fail-on-error }}" == "false" ] && exit 0
167
+ # exit 1
168
+ # fi
169
+
170
+ # Print contents of checksum file for debugging
171
+ echo "Contents of coveralls-checksums.txt:"
172
+ cat coveralls-checksums.txt
173
+
174
+ # Extract the expected checksum
175
+ expected_checksum=$(grep "${platform_filename}" coveralls-checksums.txt | awk '{print $1}')
176
+ if [ -z "$expected_checksum" ]; then
177
+ echo "Failed to extract checksum for ${platform_filename}"
178
+ [ "${{ inputs.fail-on-error }}" == "false" ] && exit 0
179
+ exit 1
180
+ fi
181
+
182
+ # Compute the actual checksum
183
+ actual_checksum=$(sha256sum "${platform_filename}" | awk '{print $1}')
184
+
185
+ # Compare checksums
186
+ if [ "$expected_checksum" != "$actual_checksum" ]; then
165
187
echo "Checksum verification failed (Linux)."
188
+ echo "Expected: $expected_checksum"
189
+ echo "Actual: $actual_checksum"
166
190
[ "${{ inputs.fail-on-error }}" == "false" ] && exit 0
167
191
exit 1
168
192
fi
You can’t perform that action at this time.
0 commit comments