Skip to content
This repository

53c9a0f6216 breaks when current commit == tag #20

Closed
hyperthunk opened this Issue · 2 comments

2 participants

Tim Watson Ulf Wiger
Tim Watson

This code breaks when you've just made a tag and the git command returns the tag-name instead of the commit sha!

get_git_branch() ->
    Git = os:cmd("git describe --always --all"),   %% returns v0.7.8 when that's the current commit!
    case string:tokens(Git, " \n/") of
        [_, Branch] -> Branch;
        Other       -> erlang:error({cannot_get_git_branch, Other})
    end.
Ulf Wiger
Collaborator
uwiger commented

Thanks. I just pushed an update to master, where the fallback for get_git_branch() becomes "master".

Ulf Wiger
Collaborator

closing - reopen issue if still a problem.

Ulf Wiger uwiger closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.