Browse Source

determine experimental's VERSION tag before writing state file

Helge Jung 9 years ago
parent
commit
702ee04eb1
1 changed files with 8 additions and 5 deletions
  1. 8 5
      build.sh

+ 8 - 5
build.sh

@@ -117,6 +117,14 @@ progress "Preparing the build environment (make update) ..."
 make update
 make update
 [ "$?" -eq "0" ] || abort "Failed to update the build environment, mimimi."
 [ "$?" -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
 # we are now ready to produke the firmware images, so let's "save" our state
 build_info_path="${OUTPUT_DIR}/${BRANCH}/${BUILD_INFO_FILENAME}"
 build_info_path="${OUTPUT_DIR}/${BRANCH}/${BUILD_INFO_FILENAME}"
 progress "Saving build information to: ${build_info_path}"
 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 "${TARGETS}" ] || TARGETS=$(get_all_supported_platforms "./targets")
 [ -n "${PRIORITY}" ] || PRIORITY=0
 [ -n "${PRIORITY}" ] || PRIORITY=0
 MAKE_PARAM=""
 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"
 [ "_$VERBOSE" = "_1" ] && MAKE_PARAM="${MAKE_PARAM} V=s"
 
 
 for target in ${TARGETS} ; do
 for target in ${TARGETS} ; do