Change build commit tracking logic

We need to record the commit at build time, since we won't know it
afterwards. This adds a build script to record the current commit into
the existing settings.yml file.