I'd like to set up a git hook that creates a CDN-style directory structure based on incoming tags. So, for example, if the last tag in the local repository is "v1.2.1" and I pull a commit with "v1.2.2", it should see the new tag and clone the repository into a new directly (../1.2.2) accordingly.
I'm pretty sure I want to attach this to post-receive, however I can't find anything in the documentation about git hooks about how to read the incoming tags. Are they delivered on a different hook? Do I actually need to have the shell script run a git command to see if any of the new commits have new tags?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…