Tito is a tool for managing RPM based projects using git for their source code repository.
Tito documentation: https://github.com/dgoodwin/tito
$ tito init
Create sections for all releasers and branches you want to build for, for example:
[fedora-rawhide]
releaser = tito.release.FedoraGitReleaser
branches = master
Make sure the spec is commited to git to make next steps work.
$ tito build --rpm --offline --test
For initial rpmbuild / spec sanity testing you can append --rpmbuild-options='--nodeps' to avoid installing unnecessary deps on your system.
$ tito tag
This creates commits in dist-git and starts builds in koji.
$ tito release <target> [target] ...
or
$ tito release --all