From patchwork Thu Jan 5 17:56:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/4] classes/buildhistory: add hostname to commit message Date: Thu, 05 Jan 2012 17:56:25 -0000 From: Paul Eggleton X-Patchwork-Id: 18475 Message-Id: <072727adc69cc29a0f3218720014a0a9724e6a08.1325785538.git.paul.eggleton@linux.intel.com> To: openembedded-core@lists.openembedded.org If we're building on multiple hosts then it's useful to have the hostname in the commit message. Signed-off-by: Paul Eggleton --- meta/classes/buildhistory.bbclass | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 06d3510..ba20914 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass @@ -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