Skip to content

Commit a75db50

Browse files
committed
Revert "fix: remove downloading feed during build"
This reverts commit a8454f1.
1 parent 17fadb1 commit a75db50

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

crates/chat-cli/build.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ fn write_plist() {
8383
fn main() {
8484
println!("cargo:rerun-if-changed=def.json");
8585

86+
// Download feed.json if FETCH_FEED environment variable is set
87+
if std::env::var("FETCH_FEED").is_ok() {
88+
download_feed_json();
89+
}
90+
8691
#[cfg(target_os = "macos")]
8792
write_plist();
8893

@@ -326,9 +331,12 @@ fn main() {
326331
/// Downloads the latest feed.json from the autocomplete repository.
327332
/// This ensures official builds have the most up-to-date changelog information.
328333
///
329-
/// TODO - temporarily disabled since GitHub API seems to be very strict with rate limiting,
330-
/// causing builds to fail.
331-
#[allow(dead_code)]
334+
/// # Errors
335+
///
336+
/// Prints cargo warnings if:
337+
/// - `curl` command is not available
338+
/// - Network request fails
339+
/// - File write operation fails
332340
fn download_feed_json() {
333341
use std::process::Command;
334342

scripts/build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def build_chat_bin(
8787
env={
8888
**os.environ,
8989
**rust_env(release=release),
90+
"FETCH_FEED": "1", # Always fetch latest feed.json for official builds
9091
},
9192
)
9293

0 commit comments

Comments
 (0)