利用GIT的HOOK機制,爲程序自動生成版本信息

利用GIT的HOOK機制,爲程序自動生成版本信息 1.git init. 創建git倉庫,能夠發現.git/hooks目錄下有一堆*.sample 2.找到post-commit.sample,post-commit表示提交代碼後觸發的命令,把後綴去掉 3.在文件最後加入命令,用於在提交以後自動生成包括hash值的頭文件: exec git log --pretty=format:'static
相關文章
相關標籤/搜索