get GitHub git branch for AWS CodeBuild

前端 未结 5 1852
鱼传尺愫
鱼传尺愫 2021-02-07 08:15

I\'m setup AWS CodeBuild to build automatically from GitHub. Other CI services provide an environment variable for the branch, but I can\'t find one for AWS CodeBuild. There is

5条回答
  •  没有蜡笔的小新
    2021-02-07 08:39

    You can run:

    git branch -a --contains 
    

    -a means all branches. If your sha is in no branch, which could happen in some cases, you won't see anything.

提交回复
热议问题