@@ -555,7 +555,7 @@ fn regen_illumos_sh<P: AsRef<Path>>(
555
555
* numbers:
556
556
*/
557
557
BuildType :: Quick | BuildType :: QuickDebug | BuildType :: Full => {
558
- let vers = "$(git describe --long --all HEAD | cut -d/ -f2-)" ;
558
+ let vers = "$(helios_build_git_version_func | cut -d/ -f2-)" ;
559
559
( 999999 , vers. into ( ) , "Oxide Helios Version ^v ^w-bit (onu)" )
560
560
}
561
561
} ;
@@ -564,6 +564,11 @@ fn regen_illumos_sh<P: AsRef<Path>>(
564
564
* Construct an environment file to build illumos-gate.
565
565
*/
566
566
let mut env = String :: new ( ) ;
567
+ env += "helios_build_git_version_func() {\n \
568
+ git describe --all --long --dirty \
569
+ --match $(git branch --show-current) --exact-match 2>/dev/null || \
570
+ git describe --all --long --dirty\n \
571
+ }\n ";
567
572
match bt {
568
573
BuildType :: Full => env += "export NIGHTLY_OPTIONS='-nCDAprt'\n " ,
569
574
BuildType :: Release => env += "export NIGHTLY_OPTIONS='-nCDAprt'\n " ,
@@ -599,7 +604,7 @@ fn regen_illumos_sh<P: AsRef<Path>>(
599
604
smatch,$SMATCHBIN,smatch\" \n ";
600
605
}
601
606
}
602
- env += "export BUILDVERSION_EXEC=\" git describe --all --long --dirty \" \n " ;
607
+ env += "export BUILDVERSION_EXEC=helios_build_git_version_func \n " ;
603
608
env += & format ! ( "export DMAKE_MAX_JOBS={}\n " , maxjobs) ;
604
609
env += "export ENABLE_SMB_PRINTING='#'\n " ;
605
610
match relver {
0 commit comments