From 76eeba3f5dfce02ba540fb891dda8862d994c2c8 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 24 Sep 2024 17:05:27 -0700 Subject: [PATCH] remove book from build script --- kinode/build.rs | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/kinode/build.rs b/kinode/build.rs index 9cc1bbbd..826a9990 100644 --- a/kinode/build.rs +++ b/kinode/build.rs @@ -75,39 +75,6 @@ fn untar_gz_file(path: &Path, dest: &Path) -> std::io::Result<()> { Ok(()) } -/// fetch .tar.gz of kinode book for docs app -fn get_kinode_book(packages_dir: &Path) -> anyhow::Result<()> { - p!("fetching kinode book .tar.gz"); - let rt = tokio::runtime::Runtime::new().unwrap(); - rt.block_on(async { - let releases = kit::boot_fake_node::fetch_releases("kinode-dao", "kinode-book") - .await - .map_err(|e| anyhow::anyhow!("{e:?}"))?; - if releases.is_empty() { - return Err(anyhow::anyhow!("couldn't retrieve kinode-book releases")); - } - let release = &releases[0]; - if release.assets.is_empty() { - return Err(anyhow::anyhow!( - "most recent kinode-book release has no assets" - )); - } - let release_url = format!( - "https://github.com/kinode-dao/kinode-book/releases/download/{}/{}", - release.tag_name, release.assets[0].name, - ); - let book_dir = packages_dir.join("docs").join("pkg").join("ui"); - fs::create_dir_all(&book_dir)?; - let book_tar_path = book_dir.join("book.tar.gz"); - kit::build::download_file(&release_url, &book_tar_path) - .await - .map_err(|e| anyhow::anyhow!("{e:?}"))?; - untar_gz_file(&book_tar_path, &book_dir)?; - fs::remove_file(book_tar_path)?; - Ok(()) - }) -} - fn build_and_zip_package( entry_path: PathBuf, parent_pkg_path: &str, @@ -198,12 +165,6 @@ fn main() -> anyhow::Result<()> { } } - if std::env::var("SKIP_BOOK").is_ok() { - p!("skipping book build"); - } else { - get_kinode_book(&packages_dir)?; - } - output_reruns(&packages_dir); let features = get_features();