-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade pgxn_meta and add download validation
Take advantage of the errors defined in pgxn_meta v0.5.0 rather than stringifying them. Add tests for errors returned by the `meta` and `download` APIs. Change the signature for `download_to` to take a pgxn_meta Release struct instead of a distribution name and version. Then use the Release both to determine the name and version to download, and then to validate the download against the digests in the Release. Update the tests for the new signature, and to ensure digest validation. Also: Update dependencies.
- Loading branch information
Showing
6 changed files
with
174 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/Cargo.lock -diff | ||
# Disable line-ending conversion of JSON files, so that the hash digest | ||
# validation tests pass on Windows. | ||
*.json -text |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
[package] | ||
name = "pgxn_build" | ||
version = "0.1.0" | ||
description = "Build PGXN distributions" | ||
repository = "https://github.com/pgxn/build" | ||
documentation = "https://docs.rs/pgxn_build/" | ||
authors = ["David E. Wheeler <[email protected]>"] | ||
readme = "README.md" | ||
keywords = ["pgxn", "postgres", "postgresql", "extension", "validation"] | ||
license = "PostgreSQL" | ||
categories = ["web-programming", "database"] | ||
edition = "2021" | ||
exclude = [ ".github", ".vscode", ".gitignore", ".ci", ".pre-*.yaml"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
chrono = "0.4" | ||
iri-string = "0.7" | ||
pgxn_meta = "0.4" | ||
pgxn_meta = "0.5.1" | ||
semver = "1.0" | ||
serde = "1.0" | ||
serde_json = "1.0" | ||
thiserror = "1.0" | ||
thiserror = "2.0" | ||
ureq = { version = "*", features = ["json"] } | ||
url = "2.5" | ||
zip = "2.2" | ||
|
||
[dev-dependencies] | ||
httpmock = "0.7" | ||
sha2 = "0.10" | ||
tempfile = "3.12" | ||
tempfile = "3.14" | ||
hex = "0.4" |
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
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
Oops, something went wrong.