#!/bin/bash # mkosi.version prints the build time in UTC (YYYYMMDDhhmm) and the git # commit. Every build gets a higher version than the one before, which is how # systemd-sysupdate tells that an update is newer. The commit tells which # source an image was built from. set -euo pipefail commit=$(git rev-parse --short HEAD) echo "$(date -u +%Y%m%d%H%M).$commit"