]> git.ipfire.org Git - people/ms/nightly-builds.git/commitdiff
Build latest core branch when branch name is core
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2017 20:03:28 +0000 (22:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Oct 2017 20:03:28 +0000 (22:03 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
build.sh

index 71ff008ea8fdef5e5dacf3a50f72a3b1e2df2361..e87111407d04049c7b540ba292224918334e23db 100755 (executable)
--- 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