Skip to content

Commit 8429c30

Browse files
authored
DuckDB renovate (#3832)
Renovate is notoriously hard to actually run and test locally... so I've downgraded the DuckDB version just to see if it will be upgraded again! We should think how we want this work r.e. our other repo, vortex-duckdb. --------- Signed-off-by: Nicholas Gates <[email protected]>
1 parent ec9d962 commit 8429c30

File tree

3 files changed

+39
-13
lines changed

3 files changed

+39
-13
lines changed

bench-vortex/build.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ use std::path::PathBuf;
2222
/// static lib is not self-contained. This means that it includes symbols which
2323
/// are not defined as part of the static library.
2424
fn main() {
25-
const DUCKDB_VERSION: &str = "v1.3.2";
2625
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
2726
let target_dir = manifest_dir.parent().unwrap().join("target");
28-
let lib_path = target_dir.join(format!("duckdb-lib-{DUCKDB_VERSION}"));
27+
let lib_path = target_dir.join("duckdb-lib");
2928
println!("cargo:rustc-link-arg=-Wl,-rpath,{}", lib_path.display());
3029
}

renovate.json

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@
2121
"patch": {
2222
"groupName": "all patch updates"
2323
},
24-
"labels": ["chore"],
24+
"labels": [
25+
"chore"
26+
],
2527
"packageRules": [
2628
{
27-
"matchUpdateTypes": ["major", "minor", "patch"],
29+
"matchUpdateTypes": [
30+
"major",
31+
"minor",
32+
"patch"
33+
],
2834
"groupName": "datafusion and friends",
2935
"matchPackageNames": [
3036
"arrow{/,}**",
@@ -35,15 +41,37 @@
3541
},
3642
{
3743
"groupName": "flatbuffers",
38-
"matchPackageNames": ["flatbuffers{/,}**", "flexbuffers{/,}**"]
44+
"matchPackageNames": [
45+
"flatbuffers{/,}**",
46+
"flexbuffers{/,}**"
47+
]
3948
},
4049
{
4150
"groupName": "futures",
42-
"matchPackageNames": ["futures{/,}**"]
51+
"matchPackageNames": [
52+
"futures{/,}**"
53+
]
4354
},
4455
{
4556
"groupName": "tonic",
46-
"matchPackageNames": ["tonic{/,}**"]
57+
"matchPackageNames": [
58+
"tonic{/,}**"
59+
]
60+
}
61+
],
62+
"regexManagers": [
63+
{
64+
"description": "Update DuckDB version in vortex-duckdb/build.rs",
65+
"customType": "regex",
66+
"fileMatch": [
67+
"vortex-duckdb/build\\.rs"
68+
],
69+
"matchStrings": [
70+
"const DUCKDB_VERSION: &str = \"(?<currentValue>[0-9]+\\.[0-9]+\\.[0-9]+)\";"
71+
],
72+
"depNameTemplate": "duckdb/duckdb",
73+
"datasourceTemplate": "github-releases",
74+
"extractVersionTemplate": "^v?(?<version>.*)$"
4775
}
4876
]
4977
}

vortex-duckdb/build.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
use std::path::PathBuf;
77
use std::{env, fs};
88

9-
const DUCKDB_VERSION: &str = "1.3.2";
9+
const DUCKDB_VERSION: &str = "1.3.1";
1010
const DUCKDB_BASE_URL: &str = "https://github.com/duckdb/duckdb/releases/download";
1111

1212
fn download_duckdb_lib_archive() -> Result<PathBuf, Box<dyn std::error::Error>> {
1313
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR")?);
1414
let target_dir = manifest_dir.parent().unwrap().join("target");
15-
let duckdb_dir = target_dir.join(format!("duckdb-lib-v{DUCKDB_VERSION}"));
15+
let duckdb_dir = target_dir.join("duckdb-lib");
1616

1717
let target = env::var("TARGET")?;
1818
let (platform, arch) = match target.as_str() {
@@ -27,7 +27,8 @@ fn download_duckdb_lib_archive() -> Result<PathBuf, Box<dyn std::error::Error>>
2727
let url = format!("{DUCKDB_BASE_URL}/v{DUCKDB_VERSION}/{archive_name}");
2828
let archive_path = duckdb_dir.join(&archive_name);
2929

30-
// Create directory if it doesn't exist.
30+
// Recreate the duckdb directory
31+
let _ = fs::remove_dir_all(&duckdb_dir);
3132
fs::create_dir_all(&duckdb_dir)?;
3233

3334
if !archive_path.exists() {
@@ -127,9 +128,7 @@ fn main() {
127128
// Download, extract and symlink DuckDB source code.
128129
let zip_source_path = download_duckdb_source_archive().unwrap();
129130
let extracted_source_path = extract_duckdb_source(zip_source_path).unwrap();
130-
if duckdb_repo.exists() {
131-
fs::remove_file(&duckdb_repo).unwrap();
132-
}
131+
let _ = fs::remove_dir_all(&duckdb_repo);
133132
std::os::unix::fs::symlink(&extracted_source_path, &duckdb_repo).unwrap();
134133

135134
// Generate the _imported_ bindings from our C++ code.

0 commit comments

Comments
 (0)