Would also be nice for packages with pkgver() to set pkgver, pkgrel, epoch to match the last build. That should allow bumps to work for -git packages.
The presence of pkgver() would be checked only. It does not have to be run. The problem with -git packages is pkgver and pkgrel often contain some old version that is updated by pkgver(), which prevents bumps from working.