git rev-parse --abbrev-ref HEAD isn't very helpful, as it always returns HEAD when you're in detached HEAD state (i.e. when deploying via gitlab).
I suggest using git log -n 1 --pretty=%d HEAD instead, in detached HEAD state it produces a more meaningful output:
(HEAD, origin/sandbox/test_git_revision_plugin)
git rev-parse --abbrev-ref HEADisn't very helpful, as it always returns HEAD when you're in detached HEAD state (i.e. when deploying via gitlab).I suggest using
git log -n 1 --pretty=%d HEADinstead, in detached HEAD state it produces a more meaningful output:(HEAD, origin/sandbox/test_git_revision_plugin)