buildhistory: record all builds
authorKoen Kooi <koen@dominion.thruhere.net>
Sat, 31 Mar 2012 22:06:43 +0000 (00:06 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Apr 2012 03:31:47 +0000 (04:31 +0100)
When nothing has changed an empty commit prefixed with "No changes" will get generated so that the commit log of the buildhistory repo provides a complete log of all builds performed, not just those that resulted in changes.

(From OE-Core rev: 2e40558cc33c5c566a9a742c32eda3ea017f8607)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 386c32c..2224340 100644 (file)
@@ -405,6 +405,8 @@ buildhistory_commit() {
                        if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
                                git push -q ${BUILDHISTORY_PUSH_REPO}
                        fi
+               else
+                       git commit ${BUILDHISTORY_DIR}/ --allow-empty -m "No changes: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
                fi) || true
 }