Add version generator script.
Take margin into account.