Skip to content

Commit c914558

Browse files
authored
Merge pull request #58 from mattip/test-checksum
add test for checksums, fix bad checksum
2 parents 65f7d88 + 461e84b commit c914558

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/nikola.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v2
2020
- name: Build docs
2121
shell: bash
22-
run: |
22+
run: python3 check_checksums.py
2323
sudo apt install virtualenv
2424
make build
2525
- name: Deploy

check_checksums.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python3
2+
3+
def main(fname):
4+
5+
with open(fname) as fid:
6+
for line in fid:
7+
if line.startswith(' '):
8+
parts = line.strip().split(' ')
9+
if len(parts[0]) != 64:
10+
raise ValueError(f'bad checksum in {line}')
11+
12+
if __name__ == "__main__":
13+
main('pages/checksums.rst')
14+

pages/checksums.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pypy3.8-v3.7.9 sha256::
3232

3333
pypy3.7-v3.7.9 sha256::
3434

35-
fc62f2c453fb851d10a1879c6e75c31ffebbf2a44d181bb06fcac4750d023fc pypy3.7-v7.3.9-aarch64.tar.bz2
35+
dfc62f2c453fb851d10a1879c6e75c31ffebbf2a44d181bb06fcac4750d023fc pypy3.7-v7.3.9-aarch64.tar.bz2
3636
3398cece0167b81baa219c9cd54a549443d8c0a6b553ec8ec13236281e0d86cd pypy3.7-v7.3.9-linux32.tar.bz2
3737
c58195124d807ecc527499ee19bc511ed753f4f2e418203ca51bc7e3b124d5d1 pypy3.7-v7.3.9-linux64.tar.bz2
3838
12d92f578a200d50959e55074b20f29f93c538943e9a6e6522df1a1cc9cef542 pypy3.7-v7.3.9-osx64.tar.bz2

0 commit comments

Comments
 (0)