Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,16 @@ fn generate_thanks() -> Result<BTreeMap<VersionTag, AuthorMap>, Box<dyn std::err
.version
.clone();

// The nightly branch is the default one, fall back to "main" if it cannot
// be read
let nightly_branch = match repo.head() {
Ok(reference) => match reference.shorthand() {
Some(name) => name.to_string(),
None => "main".to_string(),
},
Err(_) => "main".to_string(),
};

versions.push(VersionTag {
name: String::from("Beta"),
version: {
Expand All @@ -528,7 +538,7 @@ fn generate_thanks() -> Result<BTreeMap<VersionTag, AuthorMap>, Box<dyn std::err
last.minor += 2;
last
},
raw_tag: String::from("main"),
raw_tag: nightly_branch,
commit: repo
.revparse_single("HEAD")
.unwrap()
Expand Down