标签: linux git bash deployment git-bash
我设置了Git的post-receive钩子。如果提交消息包含特定单词,我想运行特定程序(用于部署)。举个例子,我们说[发布]。
post-receive
我很难找到如何在bash中捕获提交消息而我对bash不好。
post-receive的伪代码:
#!/bin/bash if [[ "$commit_message" == *"[publish]"* ]] then echo "Publishing.." fi