From ecab61baa4abdb19fd28140108698fd4fc832b09 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 17 Oct 2017 22:03:28 +0200 Subject: [PATCH] Build latest core branch when branch name is core Signed-off-by: Michael Tremer --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.47.3