浏览代码

determine experimental's VERSION tag before writing state file

Helge Jung 9 年之前
父节点
当前提交
702ee04eb1
共有 1 个文件被更改,包括 8 次插入5 次删除
  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