Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 62ed7e2

Browse filesBrowse files
Merge pull request theseus-rs#85 from theseus-rs/add-semver-support
feat!: add semantic versioning, configurable repositories and asset matchers
2 parents cfc0679 + ccd6fd2 commit 62ed7e2
Copy full SHA for 62ed7e2

File tree

Expand file treeCollapse file tree

32 files changed

+1432
-783
lines changed
Filter options
Expand file treeCollapse file tree

32 files changed

+1432
-783
lines changed

‎Cargo.lock

Copy file name to clipboardExpand all lines: Cargo.lock
+20-12Lines changed: 20 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

Copy file name to clipboardExpand all lines: Cargo.toml
+13-3Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
[workspace]
2-
default-members = ["postgresql_archive", "postgresql_commands", "postgresql_embedded"]
3-
members = ["examples/*", "postgresql_archive", "postgresql_commands", "postgresql_embedded"]
2+
default-members = [
3+
"postgresql_archive",
4+
"postgresql_commands",
5+
"postgresql_embedded",
6+
]
7+
members = [
8+
"examples/*",
9+
"postgresql_archive",
10+
"postgresql_commands",
11+
"postgresql_embedded",
12+
]
413
resolver = "2"
514

615
[workspace.package]
@@ -28,8 +37,9 @@ rand = "0.8.5"
2837
regex = "1.10.5"
2938
reqwest = { version = "0.12.5", default-features = false }
3039
reqwest-middleware = "0.3.1"
31-
reqwest-retry = "0.5.0"
40+
reqwest-retry = "0.6.0"
3241
reqwest-tracing = "0.5.0"
42+
semver = "1.0.23"
3343
serde = "1.0.203"
3444
serde_json = "1.0.118"
3545
sha2 = "0.10.8"

‎examples/archive_async/src/main.rs

Copy file name to clipboardExpand all lines: examples/archive_async/src/main.rs
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#![forbid(unsafe_code)]
22
#![deny(clippy::pedantic)]
33

4-
use postgresql_archive::{extract, get_archive, Result, DEFAULT_RELEASES_URL, LATEST};
4+
use postgresql_archive::{extract, get_archive, Result, VersionReq, DEFAULT_POSTGRESQL_URL};
55

66
#[tokio::main]
77
async fn main() -> Result<()> {
8-
let (archive_version, archive) = get_archive(DEFAULT_RELEASES_URL, &LATEST).await?;
8+
let version_req = VersionReq::STAR;
9+
let (archive_version, archive) = get_archive(DEFAULT_POSTGRESQL_URL, &version_req).await?;
910
let out_dir = tempfile::tempdir()?.into_path();
1011
extract(&archive, &out_dir).await?;
1112
println!(

‎examples/archive_sync/src/main.rs

Copy file name to clipboardExpand all lines: examples/archive_sync/src/main.rs
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#![deny(clippy::pedantic)]
33

44
use postgresql_archive::blocking::{extract, get_archive};
5-
use postgresql_archive::{Result, DEFAULT_RELEASES_URL, LATEST};
5+
use postgresql_archive::{Result, VersionReq, DEFAULT_POSTGRESQL_URL};
66

77
fn main() -> Result<()> {
8-
let (archive_version, archive) = get_archive(DEFAULT_RELEASES_URL, &LATEST)?;
8+
let version_req = VersionReq::STAR;
9+
let (archive_version, archive) = get_archive(DEFAULT_POSTGRESQL_URL, &version_req)?;
910
let out_dir = tempfile::tempdir()?.into_path();
1011
extract(&archive, &out_dir)?;
1112
println!(

‎postgresql_archive/Cargo.toml

Copy file name to clipboardExpand all lines: postgresql_archive/Cargo.toml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ reqwest = { workspace = true, default-features = false, features = ["json"] }
2424
reqwest-middleware = { workspace = true }
2525
reqwest-retry = { workspace = true }
2626
reqwest-tracing = { workspace = true }
27+
semver = { workspace = true }
2728
serde = { workspace = true, features = ["derive"] }
2829
serde_json = { workspace = true }
2930
sha2 = { workspace = true }
@@ -33,6 +34,7 @@ tempfile = { workspace = true }
3334
thiserror = { workspace = true }
3435
tokio = { workspace = true, features = ["full"], optional = true }
3536
tracing = { workspace = true, features = ["log"] }
37+
url = { workspace = true }
3638

3739
[dev-dependencies]
3840
criterion = { workspace = true }

‎postgresql_archive/README.md

Copy file name to clipboardExpand all lines: postgresql_archive/README.md
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
[![License](https://img.shields.io/crates/l/postgresql_archive?)](https://github.com/theseus-rs/postgresql-embedded/tree/main/postgresql_archive#license)
99
[![Semantic Versioning](https://img.shields.io/badge/%E2%9A%99%EF%B8%8F_SemVer-2.0.0-blue)](https://semver.org/spec/v2.0.0.html)
1010

11-
A library for downloading and extracting PostgreSQL archives from
12-
[theseus-rs/postgresql-binaries](https://github.com/theseus-rs/postgresql-binaries).
11+
A library for downloading and extracting PostgreSQL archives.
1312

1413
## Examples
1514

@@ -98,12 +97,6 @@ Licensed under either of
9897

9998
at your option.
10099

101-
PostgreSQL is covered under [The PostgreSQL License](https://opensource.org/licenses/postgresql).
102-
103-
## Notes
104-
105-
Uses PostgreSQL binaries from [theseus-rs/postgresql-binaries](https://github.com/theseus-rs/postgresql-binaries).
106-
107100
## Contribution
108101

109102
Unless you explicitly state otherwise, any contribution intentionally submitted

‎postgresql_archive/benches/archive.rs

Copy file name to clipboardExpand all lines: postgresql_archive/benches/archive.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use bytes::Bytes;
22
use criterion::{criterion_group, criterion_main, Criterion};
33
use postgresql_archive::blocking::{extract, get_archive};
4-
use postgresql_archive::{Result, DEFAULT_RELEASES_URL, LATEST};
4+
use postgresql_archive::{Result, VersionReq, DEFAULT_POSTGRESQL_URL};
55
use std::fs::{create_dir_all, remove_dir_all};
66
use std::time::Duration;
77

@@ -10,8 +10,8 @@ fn benchmarks(criterion: &mut Criterion) {
1010
}
1111

1212
fn bench_extract(criterion: &mut Criterion) -> Result<()> {
13-
let version = &LATEST;
14-
let (_archive_version, archive) = get_archive(DEFAULT_RELEASES_URL, version)?;
13+
let version_req = VersionReq::STAR;
14+
let (_archive_version, archive) = get_archive(DEFAULT_POSTGRESQL_URL, &version_req)?;
1515

1616
criterion.bench_function("extract", |bencher| {
1717
bencher.iter(|| {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.