setup: add util function for version-based staging