Stash local changes and checkout tag before building and releasing. Added a Cleaner interface to revert repo to original state after. Clean is even called after errors. Source pipe is implemented as pointer to store local state.