Skip to content

Commit

Permalink
Update build.rs folder presence
Browse files Browse the repository at this point in the history
  • Loading branch information
LeChatP committed Sep 5, 2024
1 parent 1bc42dc commit f62608d
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::error::Error;
use std::fs::File;
use std::io::{BufRead, BufReader, Write};

use std::path::Path;
use std::process::Command;

fn write_version<'a>(f: &'a mut File, doc: &'a Value) -> Result<&'a str, Box<dyn Error>> {
Expand Down Expand Up @@ -160,14 +161,17 @@ fn main() {
if let Err(err) = set_cargo_version(package_version, "Cargo.toml") {
eprintln!("cargo:warning={}", err);
}
if let Err(err) = set_cargo_version(package_version, "capable/capable/Cargo.toml") {
eprintln!("cargo:warning={}", err);
}
if let Err(err) = set_cargo_version(package_version, "capable/capable-ebpf/Cargo.toml") {
eprintln!("cargo:warning={}", err);
}
if let Err(err) = set_cargo_version(package_version, "capable/capable-common/Cargo.toml") {
eprintln!("cargo:warning={}", err);
//if folder capable/ exists
if Path::new("capable").is_dir() {
if let Err(err) = set_cargo_version(package_version, "capable/capable/Cargo.toml") {
eprintln!("cargo:warning={}", err);
}
if let Err(err) = set_cargo_version(package_version, "capable/capable-ebpf/Cargo.toml") {
eprintln!("cargo:warning={}", err);
}
if let Err(err) = set_cargo_version(package_version, "capable/capable-common/Cargo.toml") {
eprintln!("cargo:warning={}", err);
}
}
if let Err(err) = set_cargo_version(package_version, "xtask/Cargo.toml") {
eprintln!("cargo:warning={}", err);
Expand Down

0 comments on commit f62608d

Please sign in to comment.