Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Commit

Permalink
fixed the tags display during release
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Mar 14, 2018
1 parent 3b045e9 commit 09d0f14
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions grifts/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package grifts

import (
"bufio"
"bytes"
"fmt"
"os"
"os/exec"
Expand All @@ -12,11 +11,11 @@ import (
)

var _ = Add("release", func(c *Context) error {
cmd := exec.Command("git", "tag", "--list")
cmd := exec.Command("git", "tag", "--sort", "-creatordate")
if b, err := cmd.CombinedOutput(); err == nil {
lines := bytes.Split(b, []byte("\n"))
for _, l := range lines[len(lines)-6:] {
fmt.Println(string(l))
lines := strings.Split(string(b), "\n")
for _, l := range lines[:5] {
fmt.Println(l)
}
}

Expand Down

0 comments on commit 09d0f14

Please sign in to comment.