]> git.lizzy.rs Git - micro.git/commitdiff
Fetch tags if none are found
authorZachary Yedidia <zyedidia@gmail.com>
Tue, 11 Feb 2020 19:14:34 +0000 (14:14 -0500)
committerZachary Yedidia <zyedidia@gmail.com>
Tue, 11 Feb 2020 19:14:34 +0000 (14:14 -0500)
assets/packaging/micro.1
tools/build-version.go

index 184807be08a8469edd135a2a77ad32aeba036595..811ba0d7dca194f9c3fe0b1f5e7b5a43429a2079 100644 (file)
@@ -17,7 +17,7 @@ enjoyable to use full time, whether you work in the terminal because you prefer
 .SH OPTIONS
 .PP
 \-clean
-.RS4
+.RS 4
 Cleans the configuration directory
 .RE
 
@@ -28,7 +28,7 @@ Specify a custom location for the configuration directory
 .RE
 
 .PP
-\-[FILE]:LINE:COL
+[FILE]:LINE:COL
 .RS 4
 Specify a line and column to start the cursor at when opening a buffer
 .RE
index ead81a43c2ed4321ec6d61ecba50edfe59222fad..45ebd2fc1c201325cde3fecd9f00b4aa6288ea92 100644 (file)
@@ -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 {