1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-11 13:38:41 +02:00

20 lines
326 B
Go
Raw Normal View History

2016-12-21 15:03:07 -02:00
package git
import "os/exec"
2016-12-30 12:41:59 -02:00
// Log between two tags
2016-12-21 15:03:07 -02:00
func Log(previous, current string) (str string, err error) {
cmd := exec.Command(
"git",
"log",
"--pretty=oneline",
"--abbrev-commit",
previous+".."+current,
)
bts, err := cmd.CombinedOutput()
if err != nil {
return str, err
}
return string(bts), err
}