Method: TagList#latest_tag

Defined in:
lib/tag_list.rb

#latest_tagString

Returns the most recent tag in the git repository, or the sha1 of the initial commit if there is no tag.

Returns:

  • (String)


41
42
43
44
45
# File 'lib/tag_list.rb', line 41

def latest_tag
  # Index 0 is HEAD
  # Index 1 is most recent tag or first commit
  @list[1]
end