mirror of
https://github.com/uqbar-dao/nectar.git
synced 2025-01-03 06:11:01 +03:00
remove book from build script
This commit is contained in:
parent
6c61387c35
commit
76eeba3f5d
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user