From 274ec0ac9ed4be22cdc300876da84ddc0b988464 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Litza Date: Thu, 11 Feb 2016 22:36:54 +0100 Subject: [PATCH] build.sh: Rework branch concept We only build "stable" images now and push them first to the testing branch and then to the stable branch. Thus, the versioning should always be based on the newer of the two branches, stable and testing. A paramter isn't needed anymore. This closes #15 and #14. --- build.sh | 56 ++++++++++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/build.sh b/build.sh index 86fc460..cbcb2a3 100755 --- a/build.sh +++ b/build.sh @@ -40,32 +40,26 @@ extract_local_version() { echo "${local_version_tmp%~testing}" } -if [ "$#" = 0 ]; then - cat < - -This script takes the intended branch, "testing" or "stable", as the single -parameter. It then tries to autodetermine the correct release name, builds -gluon for the corresponding branch and all supported platforms (excluding -x86*), and optionally signs it if an ecdsutils keyfile is found (standard path: -~/.ecdsakey) -USAGE - exit 1 -fi - debug= -if [ "$1" = "--debug" ]; then - debug=1 - shift -fi - -GLUON_BRANCH="$1" - -if [ "$GLUON_BRANCH" != "testing" -a "$GLUON_BRANCH" != "stable" ]; then - echo "Branch not supported yet!" - exit 1 +if [ "$#" -gt 0 ]; then + if [ "$1" = '-h' -o "$1" = '--help' ]; then + cat < reset local version number local_version=1 fi - if [ "$GLUON_BRANCH" = "testing" ]; then - local_version="${local_version}~testing" - fi auto_determined_release="${GLUON_TAG}+${LOCAL_SUFFIX}${local_version}" read -p "Release name for this build [default: ${auto_determined_release}]: " GLUON_RELEASE GLUON_RELEASE="${GLUON_RELEASE:-$auto_determined_release}" @@ -155,6 +142,7 @@ for target in ar71xx-generic ar71xx-nand mpc85xx-generic x86-generic; do echo "TARGET_${env_target}_DONE=1" >> "$statefile" done make manifest +make manifest GLUON_BRANCH=testing GLUON_PRIORITY=0 cd .. if [ -n "$KEYFILE" -a -r "$KEYFILE" ]; then