2

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?

3
  • Where is the version number supposed to come from? A tag that is already present in the repository?
    – Daniel B
    Dec 27, 2015 at 20:58
  • Daniel, yes, exactly. Dec 28, 2015 at 7:07
  • Are you sure the tag is present in the remote repository? Because it’s working perfectly fine for me with a detached head.
    – Daniel B
    Dec 28, 2015 at 12:27

1 Answer 1

1

Nevermind, there was a filter-branch problem (which I did prior to migration to cleanup some minor errors): commit hashes changed after it, so tags existed, but pointed to non-existing commits.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .