Procházet zdrojové kódy

Suppress error when on detached head

Richard Wackerbarth před 9 roky
rodič
revize
b3a3080b4b

+ 2
- 3
LinuxAddons/bin/generate_version_header_for_marlin Zobrazit soubor

@@ -13,8 +13,8 @@ echo "#define BUILD_UNIX_DATETIME" `date +%s` >>"$OUTFILE"
13 13
 echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE"
14 14
 ( set +e
15 15
   cd "$DIR"
16
-  BRANCH=`git symbolic-ref --short HEAD`
17
-  if [ "x$BRANCH" == "xHEAD" ] ; then
16
+  BRANCH=`git symbolic-ref -q --short HEAD`
17
+  if [ "x$BRANCH" == "x" ] ; then
18 18
     BRANCH=""
19 19
   elif [ "x$BRANCH" == "xDevelopment" ] ; then
20 20
     BRANCH=" dev"
@@ -31,5 +31,4 @@ echo "#define STRING_DISTRIBUTION_DATE" `date '+"%Y-%m-%d %H:%M"'` >>"$OUTFILE"
31 31
     echo "// Deprecated URL definition" >>"$OUTFILE"
32 32
     echo "#define FIRMWARE_URL  \""$URL"\"" >>"$OUTFILE"
33 33
   fi
34
-  
35 34
 )

Loading…
Zrušit
Uložit