Skip to content

Commit 41138dd

Browse files
committed
stuff
1 parent 247c72a commit 41138dd

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/VersionsJSONUtil.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,22 +478,20 @@ function main!(content::OutputJsonContent, cfg::Config)
478478
else
479479
error("Unsupported file extension in filename: $(filename)")
480480
end
481+
new_etag = get_new_etag_for_url(url)
482+
481483
file_dict = OrderedDict{String, Union{String, Int}}()
484+
file_dict["arch"] = string(arch(platform))
482485
file_dict["triplet"] = triplet(platform)
483486
file_dict["os"] = meta_os(platform)
484-
file_dict["arch"] = string(arch(platform))
485487
file_dict["version"] = string(version)
486488
file_dict["sha256"] = tarball_hash
487489
file_dict["size"] = filesize(filepath)
488490
file_dict["kind"] = kind
489491
file_dict["extension"] = extension
490492
file_dict["url"] = url
491493

492-
new_etag = get_new_etag_for_url(url)
493-
if isnothing(new_etag)
494-
@warn "Failed to get new ETag for URL: $url"
495-
return false
496-
else
494+
if !isnothing(new_etag)
497495
file_dict["etag"] = new_etag
498496
end
499497

@@ -502,6 +500,7 @@ function main!(content::OutputJsonContent, cfg::Config)
502500
push!(meta[string(version)]["files"], file_dict)
503501

504502
# Write out new versions of our versions.json as we go
503+
sort!(file_dict)
505504
checkpoint(content, cfg)
506505

507506
# Delete downloaded file
@@ -543,6 +542,9 @@ function main!(content::OutputJsonContent, cfg::Config)
543542
# Add in `.asc` signature content, if applicable
544543
if !isnothing(asc_signature)
545544
file_dict["asc"] = asc_signature
545+
546+
# Explicitly sort file_dict
547+
sort!(file_dict)
546548
checkpoint(content, cfg)
547549
end
548550
end

0 commit comments

Comments
 (0)