From: Michael Tremer Date: Tue, 17 Oct 2017 20:03:28 +0000 (+0200) Subject: Build latest core branch when branch name is core X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecab61baa4abdb19fd28140108698fd4fc832b09;p=people%2Fms%2Fnightly-builds.git Build latest core branch when branch name is core Signed-off-by: Michael Tremer --- diff --git a/build.sh b/build.sh index 71ff008..e871114 100755 --- a/build.sh +++ b/build.sh @@ -51,6 +51,11 @@ build() { local commit_old="$(git rev-parse HEAD)" git fetch + # Search for the latest core branch + if [ "${branch}" = "core" ]; then + branch=$(git branch -r | awk -F/ '{ print $NF }' | grep ^core | sort --version-sort | tail -n1) + fi + # If the branch was not updated, we won't build local commit_new="$(git rev-parse origin/${branch})" [ "${commit_old}" = "${commit_new}" ] && return 2