forked from toolshed/abra
		
	| @ -1,6 +1,7 @@ | ||||
| package git | ||||
|  | ||||
| import ( | ||||
| 	"coopcloud.tech/abra/pkg/i18n" | ||||
| 	"coopcloud.tech/abra/pkg/log" | ||||
| 	"github.com/go-git/go-git/v5" | ||||
| 	"github.com/go-git/go-git/v5/config" | ||||
| @ -9,7 +10,7 @@ import ( | ||||
| // Push pushes the latest changes & optionally tags to the default remote | ||||
| func Push(repoDir string, remote string, tags bool, dryRun bool) error { | ||||
| 	if dryRun { | ||||
| 		log.Debugf("dry run: no git changes pushed in %s", repoDir) | ||||
| 		log.Debug(i18n.G("dry run: no git changes pushed in %s", repoDir)) | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| @ -27,7 +28,7 @@ func Push(repoDir string, remote string, tags bool, dryRun bool) error { | ||||
| 		return err | ||||
| 	} | ||||
|  | ||||
| 	log.Debugf("git changes pushed") | ||||
| 	log.Debug(i18n.G("git changes pushed")) | ||||
|  | ||||
| 	if tags { | ||||
| 		opts.RefSpecs = append(opts.RefSpecs, config.RefSpec("+refs/tags/*:refs/tags/*")) | ||||
| @ -36,7 +37,7 @@ func Push(repoDir string, remote string, tags bool, dryRun bool) error { | ||||
| 			return err | ||||
| 		} | ||||
|  | ||||
| 		log.Debugf("git tags pushed") | ||||
| 		log.Debug(i18n.G("git tags pushed")) | ||||
| 	} | ||||
|  | ||||
| 	return nil | ||||
|  | ||||
		Reference in New Issue
	
	Block a user