- Yair Mark
On a CI system we use we have it configured so that it only rebuilds and deploys a repos code if that repo is tagged. This is cool in that it lets you have explicit control over when you deploy without restricting people from committing. The main issue is that reusing a git tag (if you are still working on the same version of the app) can be quite cumbersome. So I made the following bash/zsh function which can be added to your .bashrc/.zshrc file and be invoked as follows:
This outputs the following:
Deleting tag v1.0 locally Deleted tag 'v1.0' (was f864e0f) Deleting tag v1.0 on remote To github.com:your-user/your-project.git - [deleted] v1.0 Tag the current head with v1.0 locally Push v1.0 to remote Total 0 (delta 0), reused 0 (delta 0) To github.com:your-user/your-project.git * [new tag] v1.0 -> v1.0 Done...
The shell function you need to add to your rc file is: