Situation: Our company creates software releases that are built using Hudson from code in a git repository. Sometimes, we need to reproduce a build of a previous version because a trial period has expired. This poses a problem since we need to find the code version corresponding to that software version. Our developers do not work using tags or branches, as it does not fit our working style.
As a solution to this problem, I thought we should include an automated tagging system every time a build is succesful.
The workflow I had in mind is the follwoing (executed on our build-machine):
- Toss all local changes if any were made:
git checkout .git clean -df - Get latest version:
git pull - Go to desired version
git checkout .orgit checkout <tag> - Build software
- If successful: tag current version, and push tag to repository:
git tag -m "automated tag" versionXXXgit push --tags
I have 3 questions regarding this way of working:
- Are there any obvious flaws in this way of working? (Vague, I know - sorry)
- For this usecase, is there any advantage to using annotated tags over lightweight tags? Most posts recommend annotated tags, but I'm not really seeing the added value, especially for this use case.
- Our software consists of multiple modules, each having their own git repository. Some of these modules hardly get updated. Is there any downside to having a lot of tags pointing to the same commit?