classes/buildhistory: use hostname instead of reading /etc/hostname
For the purposes of querying the hostname to include it in the commit message, it seems "cat /etc/hostname" does not work on the Yocto Project autobuilder machines, and it's likely that the hostname command will be more generally reliable, so use that instead. (From OE-Core rev: cb939b753c9e7648a38e22e0349c279da785e69d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
04c290a492
commit
1b7014ffc5
|
@ -383,7 +383,7 @@ buildhistory_commit() {
|
|||
repostatus=`git status --porcelain`
|
||||
if [ "$repostatus" != "" ] ; then
|
||||
git add ${BUILDHISTORY_DIR}/*
|
||||
HOSTNAME=`cat /etc/hostname 2>/dev/null || echo unknown`
|
||||
HOSTNAME=`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}
|
||||
|
|
Loading…
Reference in New Issue