Skip to content

Commit

Permalink
Switch hash to sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
faho committed Aug 11, 2024
1 parent ca2c005 commit 89337ac
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/assets/css/fish_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ h3 {
margin-bottom: 1px;
}

.app-sha1 {
.app-sha256 {
font-size: 10pt;
overflow-x: scroll;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ <h3>

<p>
<small>
SHA1: <span class="mono app-sha1">d711f20b53693b4f0946489b1b0abcbccc8888d8</span>
SHA256: <span class="mono app-sha256">614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250</span>
</small>
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion site/_data/releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"md_tarball_size": "2.8 MB",
"md_mac_app_url": "https://github.com/fish-shell/fish-shell/releases/download/3.7.1/fish-3.7.1.app.zip",
"md_mac_pkg_url": "https://github.com/fish-shell/fish-shell/releases/download/3.7.1/fish-3.7.1.pkg",
"md_tarball_sha1": "d711f20b53693b4f0946489b1b0abcbccc8888d8"
"md_tarball_sha256": "614c9f5643cd0799df391395fa6bbc3649427bb839722ce3b114d3bbc1a3b250"
},
{
"url": "https://api.github.com/repos/fish-shell/fish-shell/releases/135471899",
Expand Down
2 changes: 1 addition & 1 deletion site/assets/css/fish_style.css
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ h3 {
margin-bottom: 1px;
}

.app-sha1 {
.app-sha256 {
font-size: 10pt;
overflow-x: scroll;
}
Expand Down
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ <h3>

<p>
<small>
SHA1: <span class="mono app-sha1">{{ release.md_tarball_sha1 }}</span>
SHA256: <span class="mono app-sha256">{{ release.md_tarball_sha256 }}</span>
</small>
</p>
</div>
Expand Down
10 changes: 5 additions & 5 deletions tools/update_release_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def format_size(bytecount):
""" Format a byte count in megabytes """
return '%.1f MB' % (int(bytecount) / (1024 * 1024))

def sha1of(url):
def sha256of(url):
""" return the sha1 of the contents of the URL """
sys.stderr.write("sha1 of %s...\n" % url)
sys.stderr.write("sha256 of %s...\n" % url)
data = requests.get(url).content
result = hashlib.sha1(data).hexdigest()
result = hashlib.sha256(data).hexdigest()
sys.stderr.write("Got %s\n" % result)
return result

Expand Down Expand Up @@ -57,9 +57,9 @@ def get_asset(release, extension):
# diff noise.
for asset in rel['assets']:
del asset['download_count']
# Compute the SHA1 for the first tarball only.
# Compute the SHA256 for the first tarball only.
if first:
rel['md_tarball_sha1'] = sha1of(tarball['browser_download_url'])
rel['md_tarball_sha256'] = sha256of(tarball['browser_download_url'])
first = False

# We've modified the dictionaries in place, output them again.
Expand Down

0 comments on commit 89337ac

Please sign in to comment.