Skip to content

Commit

Permalink
(feat) Track overridden zq2 source under its own name (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrw-zilliqa authored Jun 3, 2024
1 parent 2a3027c commit f2cce35
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docgen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ async fn main() -> Result<()> {
let root_path = PathBuf::from(&here);
let versions: Zq2Spec =
serde_yaml::from_str(&fs::read_to_string(format!("{}/zq2_spec.yaml", here))?)?;
for vrec in &versions.versions {
let overridden_zq2 = std::env::var("USE_ZQ2_FROM").is_ok();
let vtable = if overridden_zq2 {
vec![Version {
refspec: "use_zq2_from".to_string(),
name: Some("use_zq2_from".to_string()),
}]
} else {
versions.versions.clone()
};

for vrec in &vtable {
let refspec = &vrec.refspec;
let name: String = match vrec.name {
None => {
Expand Down

0 comments on commit f2cce35

Please sign in to comment.