]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/buildhistory: add hostname to commit message
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Thu, 5 Jan 2012 17:24:45 +0000 (17:24 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Jan 2012 11:27:26 +0000 (11:27 +0000)
If we're building on multiple hosts then it's useful to have the
hostname in the commit message.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta/classes/buildhistory.bbclass

index 06d3510ddc4300905f58e268e2b97523919a0b6b..ba20914f4517596c9a10bfbea0f09d016a1daf2e 100644 (file)
@@ -356,7 +356,8 @@ buildhistory_commit() {
                repostatus=`git status --porcelain`
                if [ "$repostatus" != "" ] ; then
                        git add ${BUILDHISTORY_DIR}/*
-                       git commit ${BUILDHISTORY_DIR}/ -m "Build ${BUILDNAME} for machine ${MACHINE} configured for ${DISTRO} ${DISTRO_VERSION}" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
+                       HOSTNAME=`cat /etc/hostname 2>/dev/null || echo unknown`
+                       git commit ${BUILDHISTORY_DIR}/ -m "Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
                        if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
                                git push -q ${BUILDHISTORY_PUSH_REPO}
                        fi