Skip to content

Commit

Permalink
set default download branch to main instead of master (#191)
Browse files Browse the repository at this point in the history
Signed-off-by: samuel orji <[email protected]>
  • Loading branch information
samuelorji authored Oct 6, 2023
1 parent d11e7be commit 5c5a52d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api_generator/src/bin/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ fn main() -> anyhow::Result<()> {
let download_dir = fs::canonicalize(Path::new("./api_generator/rest_specs"))?;
let generated_dir = fs::canonicalize(Path::new("./opensearch/src"))?;
let last_downloaded_version = Path::new("./api_generator/rest_specs/last_downloaded_version");
let default_specification_download_branch = String::from("main");

let mut download_specs = false;
let mut answer = String::new();
let default_branch = if last_downloaded_version.exists() {
fs::read_to_string(last_downloaded_version)?
} else {
String::from("master")
default_specification_download_branch
};
let mut branch = default_branch.clone();

Expand Down

0 comments on commit 5c5a52d

Please sign in to comment.