Skip to content

Commit 088ba68

Browse files
committed
Use SHA 256 instead of MD5 in the release script
1 parent ef9eb13 commit 088ba68

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

release/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ script can take about an hour or so to run (depending on how long the tests
6060
take). Every time you re-run the script, it pulls from the branch and runs
6161
everything from scratch.
6262

63-
At the end it will print two things, the list of authors, and the md5 sums.
63+
At the end it will print two things, the list of authors, and the sha256 sums.
6464
Copy the list of authors into the release notes. You should verify that the
65-
md5 sums of the release files are the same as what are printed.
65+
sha256 sums of the release files are the same as what are printed.
6666

6767
# Tagging the release
6868

release/rever.xsh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $ACTIVITIES = [
4242
'test_tarball36',
4343
'test_tarball37',
4444
'print_authors',
45-
'md5',
45+
'sha256',
4646
# 'tag',
4747
]
4848

@@ -201,17 +201,17 @@ Thanks to everyone who contributed to this release!
201201
print()
202202

203203
@activity(deps={'source_tarball', 'build_docs'})
204-
def md5():
204+
def sha256():
205205
"""
206-
Print the md5 sums of the release files
206+
Print the sha256 sums of the release files
207207
"""
208-
_md5(print_=True)
208+
_sha256(print_=True)
209209

210-
def _md5(print_=True, local=False):
210+
def _sha256(print_=True, local=False):
211211
if local:
212-
out = $(md5sum @(release_files()))
212+
out = $(shasum -a 256 @(release_files()))
213213
else:
214-
out = $(md5sum /root/release/*)
214+
out = $(shasum -a 256 /root/release/*)
215215
# Remove the release/ part for printing. Useful for copy-pasting into the
216216
# release notes.
217217
out = [i.split() for i in out.strip().split('\n')]
@@ -220,7 +220,7 @@ def _md5(print_=True, local=False):
220220
print(out)
221221
return out
222222

223-
@activity(deps={'mailmap_update', 'md5', 'print_authors', 'source_tarball', 'build_docs', 'compare_tar_against_git', 'test_tarball27', 'test_tarball34', 'test_tarball35', 'test_tarball36', 'test_sympy'})
223+
@activity(deps={'mailmap_update', 'sha256', 'print_authors', 'source_tarball', 'build_docs', 'compare_tar_against_git', 'test_tarball27', 'test_tarball34', 'test_tarball35', 'test_tarball36', 'test_sympy'})
224224
def release():
225225
pass
226226

@@ -541,7 +541,7 @@ def _GitHub_release(username=None, user='sympy', token=None,
541541

542542
print(green("Done"))
543543

544-
# TODO: download the files and check that they have the right md5 sum
544+
# TODO: download the files and check that they have the right sha256 sum
545545

546546
def _size(print_=True):
547547
"""
@@ -565,8 +565,8 @@ def table():
565565

566566
tarball_formatter_dict['version'] = shortversion
567567

568-
md5s = [i.split('\t') for i in _md5(print_=False, local=True).split('\n')]
569-
md5s_dict = {name: md5 for md5, name in md5s}
568+
sha256s = [i.split('\t') for i in _sha256(print_=False, local=True).split('\n')]
569+
sha256s_dict = {name: sha256 for sha256, name in sha256s}
570570

571571
sizes = [i.split('\t') for i in _size(print_=False).split('\n')]
572572
sizes_dict = {name: size for size, name in sizes}
@@ -589,7 +589,7 @@ def table():
589589

590590
with tag('table'):
591591
with tag('tr'):
592-
for headname in ["Filename", "Description", "size", "md5"]:
592+
for headname in ["Filename", "Description", "size", "sha256"]:
593593
with tag("th"):
594594
table.append(headname)
595595

@@ -605,7 +605,7 @@ def table():
605605
with tag('td'):
606606
table.append(sizes_dict[name])
607607
with tag('td'):
608-
table.append(md5s_dict[name])
608+
table.append(sha256s_dict[name])
609609

610610
out = ' '.join(table)
611611
return out

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy