mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-15 21:37:09 +09:00
Fetch tags if none are found
This commit is contained in:
@@ -15,6 +15,11 @@ func getTag(match ...string) (string, *semver.PRVersion) {
|
||||
if tag, err := exec.Command("git", args...).Output(); err != nil {
|
||||
return "", nil
|
||||
} else {
|
||||
if len(tag) == 0 {
|
||||
if _, err := exec.Command("git", "fetch", "tags").Output(); err != nil {
|
||||
return "", nil
|
||||
}
|
||||
}
|
||||
tagParts := strings.Split(string(tag), "-")
|
||||
if len(tagParts) == 3 {
|
||||
if ahead, err := semver.NewPRVersion(tagParts[1]); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user