mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
20 lines
326 B
Go
20 lines
326 B
Go
package git
|
|
|
|
import "os/exec"
|
|
|
|
// Log between two tags
|
|
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
|
|
}
|