Explorar el Código

determine experimental's VERSION tag before writing state file

Helge Jung hace 9 años
padre
commit
702ee04eb1
Se han modificado 1 ficheros con 8 adiciones y 5 borrados
  1. 8 5
      build.sh

+ 8 - 5
build.sh

@@ -117,6 +117,14 @@ progress "Preparing the build environment (make update) ..."
 make update
 [ "$?" -eq "0" ] || abort "Failed to update the build environment, mimimi."
 
+# determine VERSION for BRANCH=experimental if it is not set
+if [ "${BRANCH}" == "experimental" -a -z "${VERSION}" ] ; then
+    default_release_pattern=$( awk -F" := " '/^DEFAULT_GLUON_RELEASE/ { gsub("shell ", "", $2); print $2; }' ./site/site.mk )
+    VERSION=$(eval echo ${default_release_pattern})
+
+    info "EXPERIMENTAL FIRMWARE: using version tag '$VERSION'"
+fi
+
 # we are now ready to produke the firmware images, so let's "save" our state
 build_info_path="${OUTPUT_DIR}/${BRANCH}/${BUILD_INFO_FILENAME}"
 progress "Saving build information to: ${build_info_path}"
@@ -138,11 +146,6 @@ progress "Building the firmware - please stand by!"
 [ -n "${TARGETS}" ] || TARGETS=$(get_all_supported_platforms "./targets")
 [ -n "${PRIORITY}" ] || PRIORITY=0
 MAKE_PARAM=""
-
-if [ "${BRANCH}" == "experimental" -a -z "${VERSION}" ] ; then
-    default_release_pattern=$( awk -F" := " '/^DEFAULT_GLUON_RELEASE/ { gsub("shell ", "", $2); print $2; }' ./site/site.mk )
-    VERSION=$(eval echo ${default_release_pattern})
-fi
 [ "_$VERBOSE" = "_1" ] && MAKE_PARAM="${MAKE_PARAM} V=s"
 
 for target in ${TARGETS} ; do