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 0cb16e0

Browse filesBrowse files
committed
feat: allow releases url to be specified at build time when the bundles flag is set with the POSTGRESQL_RELEASES_URL environment variable
1 parent cf347cd commit 0cb16e0
Copy full SHA for 0cb16e0

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎postgresql_embedded/build/bundle.rs

Copy file name to clipboardExpand all lines: postgresql_embedded/build/bundle.rs
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use std::{env, fs};
1414
/// self-contained binary that does not require the PostgreSQL archive to be
1515
/// downloaded at runtime.
1616
pub(crate) async fn stage_postgresql_archive() -> Result<()> {
17+
let releases_url = env::var("POSTGRESQL_RELEASES_URL").unwrap_or(DEFAULT_RELEASES_URL.to_string());
18+
println!("PostgreSQL releases URL: {releases_url}");
1719
let postgres_version = env::var("POSTGRESQL_VERSION").unwrap_or(LATEST.to_string());
1820
let version = Version::from_str(postgres_version.as_str())?;
1921
println!("PostgreSQL version: {postgres_version}");
@@ -31,7 +33,7 @@ pub(crate) async fn stage_postgresql_archive() -> Result<()> {
3133
return Ok(());
3234
}
3335

34-
let (asset_version, archive) = get_archive(DEFAULT_RELEASES_URL, &version).await?;
36+
let (asset_version, archive) = get_archive(&releases_url, &version).await?;
3537

3638
fs::write(archive_version_file.clone(), asset_version.to_string())?;
3739
let mut file = File::create(archive_file.clone())?;

0 commit comments

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