forked from toolshed/abra
refactor: dont' create the same objects twice
This commit is contained in:
parent
c0f92ca13d
commit
cd179175f5
@ -76,14 +76,6 @@ var recipeReleaseCommand = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if tagstring != "" {
|
if tagstring != "" {
|
||||||
repo, err := git.PlainOpen(directory)
|
|
||||||
if err != nil {
|
|
||||||
logrus.Fatal(err)
|
|
||||||
}
|
|
||||||
head, err := repo.Head()
|
|
||||||
if err != nil {
|
|
||||||
logrus.Fatal(err)
|
|
||||||
}
|
|
||||||
if Dry {
|
if Dry {
|
||||||
logrus.Info(fmt.Sprintf("Dry run only. NOT creating tag %s at %s", tagstring, head.Hash()))
|
logrus.Info(fmt.Sprintf("Dry run only. NOT creating tag %s at %s", tagstring, head.Hash()))
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user