Skip to content

Commit

Permalink
nightly: use exact branch name in $BUILDVERSION_EXEC
Browse files Browse the repository at this point in the history
  • Loading branch information
dancrossnyc committed Sep 9, 2024
1 parent 5127748 commit 5d6c71c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tools/helios-build/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,11 @@ fn regen_illumos_sh<P: AsRef<Path>>(
* numbers:
*/
BuildType::Quick | BuildType::QuickDebug | BuildType::Full => {
let vers = "$(git describe --long --all HEAD | cut -d/ -f2-)";
let vers = "$($(git describe --all --long --dirty \
--match $(git branch --show-current) --exact-match \
2>/dev/null || \
git describe --all --long --dirty) | \
cut -d/ -f2-)";
(999999, vers.into(), "Oxide Helios Version ^v ^w-bit (onu)")
}
};
Expand Down Expand Up @@ -599,7 +603,12 @@ fn regen_illumos_sh<P: AsRef<Path>>(
smatch,$SMATCHBIN,smatch\"\n";
}
}
env += "export BUILDVERSION_EXEC=\"git describe --all --long --dirty\"\n";
env += "helios_build_buildversion_exec_function() { \n\
git describe --all --long --dirty \
--match $(git branch --show-current) --exact-match 2>/dev/null || \
git describe --all --long --dirty \n\
}\n";
env += "export BUILDVERSION_EXEC=helios_build_buildversion_exec_function\n";
env += &format!("export DMAKE_MAX_JOBS={}\n", maxjobs);
env += "export ENABLE_SMB_PRINTING='#'\n";
match relver {
Expand Down

0 comments on commit 5d6c71c

Please sign in to comment.