Skip to content

Commit

Permalink
Buildall-fbobjc directive fix filtering for fbobjc
Browse files Browse the repository at this point in the history
Summary: This should avoid any filtering bc of ranking and verse etc when buildall-fbobjc directive is present.

Reviewed By: Acesine

Differential Revision: D57787273

fbshipit-source-id: 237291272788b5b391f8314fc737a465cf721009
  • Loading branch information
Abishek Sethuraman authored and facebook-github-bot committed May 30, 2024
1 parent 25de298 commit dc92e8c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions td_util/src/directives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

//! Parsing directives from skycastle
use crate::project::TdProject;

pub fn get_app_specific_build_directives(directives: &Option<Vec<String>>) -> Option<Vec<String>> {
directives.as_ref().map(|directives| {
directives
Expand Down Expand Up @@ -48,6 +50,14 @@ pub fn app_specific_build_directives_matches_name(
})
}

pub fn should_build_all_fbobjc(directives: &Option<Vec<String>>, project: TdProject) -> bool {
return directives
.iter()
.flatten()
.any(|build_directive| build_directive == "#buildall-fbobjc")
&& project == TdProject::Fbobjc;
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit dc92e8c

Please sign in to comment.