I'm trying to migrate from Buildbot to Gitlab CI. Everything works fine, except getting version number from git. We were using
git describe --always --tags --abbrev=4
command in conjunction with reasonable tag names (like "1.0"). It worked flawlessly with buildbot, but for some reason gitlab-ci checkouts to HEAD revision making the working copy to be in "detached head" state, so beforementioned command returns ugly version names (like "53ab" instead of say "1.0-50-g53ab"). Is there a way to get commit description with tags in this case?