Created
October 3, 2024 02:22
-
-
Save cadojo/4ccd8508f29d3c85bca5fd66c738545c to your computer and use it in GitHub Desktop.
Check for commits in the General registry.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Git | |
using TOML | |
commit_exists(hash::AbstractString) = | |
try | |
run(pipeline(git(["cat-file", "-t", hash]); stdout = devnull)) | |
return true | |
catch e | |
@error "$e" | |
return false | |
end | |
function versions(package::AbstractString) | |
content = TOML.parsefile( | |
joinpath("General", string(uppercase(first(package))), package, "Versions.toml"), | |
) | |
return first.(values.(values(content))) | |
end | |
packages = ( | |
"GeneralAstrodynamics", | |
"AstrodynamicalCalculations", | |
"AstrodynamicalModels", | |
"AstrodynamicalSolvers", | |
) | |
for package in packages | |
for commit in versions(package) | |
@assert commit_exists(commit) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment