Create a separated script for generating version/release numbers
This moves the logic of generating version release numbers from
`rpmbuild.sh` to a separated script, so that getting the current
version/release number for CI/CD and container builds without building RPMs
is possible and easier.
The output will be exported to environment variables.
The usage is simply sourcing the script.