-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
registry: allow publishing extensions of several Postgres versions #572
Conversation
Some(ext) | ||
if ext == "json" | ||
&& path.file_stem().and_then(OsStr::to_str) == Some("manifest") => | ||
{ | ||
// We're now iterating through manifest.json | ||
let manifest = decompress_file(&mut entry, entry_size)?; | ||
let manifest: Manifest = serde_json::from_str(&manifest) | ||
.with_context(|| "Failed to deserialize manifest.json")?; | ||
|
||
manifest_json = Some(manifest); | ||
} | ||
Some(_) | None => continue, | ||
} | ||
} | ||
|
||
Ok(control_files) | ||
anyhow::ensure!( | ||
manifest_json.is_some(), | ||
"Failed to find manifest.json in archive being uploaded" | ||
); | ||
|
||
Ok(ExtractedArchive { | ||
control_files, | ||
manifest: manifest_json.unwrap(), | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrmiguel Is this just to make sure a manifest.json file is included in the tar.gz? Are we doing anything with the manifest.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using the Manifest to check which Postgres version the extension was built for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment above but otherwise I think it looks good to try out :)
No description provided.