Using git on my server update worktree and www directory with new versions?

无人久伴 提交于 2020-01-06 13:11:29

问题


Let's say I am building a UI and I have a version with a particular layout and scheme we can call it v0.0.1, it's nice but I decide I want to change some drastic layout features, fonts, colors etc and say I call this new version v0.0.2.

I tag first project, git tag -a v0.0.1 -m 'first version' then I push it to the server git push live master where I have a hook (push command triggers post-receive bash script) which takes the repo files and sends it to my live directory which the client can preview.

The files are served www/example.com/public_html/clients/john/dist what I would like to do is possibly in the post-receive bash script look for a new tag then run a linux command like mkdir v0.0.2 so that the worktree changes to www/example.com/public_html/clients/john/v0.0.2/dist

So I wanted to ask, what is a proper way in updating my worktree and creating a new folder with new pushed versions?

来源:https://stackoverflow.com/questions/29758876/using-git-on-my-server-update-worktree-and-www-directory-with-new-versions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!