mirror of
https://github.com/cooperspencer/gickup.git
synced 2025-05-11 17:55:34 +02:00
added git lfs for mirrors (#204)
* added git lfs for mirrors * added openssh-client to ubuntu image * working push on all branches * fetch after clone and before pull to get all branches * checkout all branches is not needed * fix fetch
This commit is contained in:
parent
76bcf763aa
commit
8de9d0f16f
4 changed files with 275 additions and 50 deletions
7
main.go
7
main.go
|
@ -270,7 +270,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
|
|||
continue
|
||||
}
|
||||
|
||||
err = local.CreateRemotePush(temprepo, d, cloneurl)
|
||||
err = local.CreateRemotePush(temprepo, d, cloneurl, r.Origin.LFS)
|
||||
if err != nil {
|
||||
if err == git.NoErrAlreadyUpToDate {
|
||||
log.Info().
|
||||
|
@ -293,7 +293,6 @@ func backup(repos []types.Repo, conf *types.Conf) {
|
|||
|
||||
prometheus.RepoSuccess.WithLabelValues(r.Hoster, r.Name, r.Owner, "github", "https://github.com").Set(float64(status))
|
||||
prometheus.DestinationBackupsComplete.WithLabelValues("github").Inc()
|
||||
os.RemoveAll(tempdir)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -348,7 +347,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
|
|||
continue
|
||||
}
|
||||
|
||||
err = local.CreateRemotePush(temprepo, d, cloneurl)
|
||||
err = local.CreateRemotePush(temprepo, d, cloneurl, r.Origin.LFS)
|
||||
if err != nil {
|
||||
if err == git.NoErrAlreadyUpToDate {
|
||||
log.Info().
|
||||
|
@ -426,7 +425,7 @@ func backup(repos []types.Repo, conf *types.Conf) {
|
|||
continue
|
||||
}
|
||||
|
||||
err = local.CreateRemotePush(temprepo, d, cloneurl)
|
||||
err = local.CreateRemotePush(temprepo, d, cloneurl, r.Origin.LFS)
|
||||
if err != nil {
|
||||
if err == git.NoErrAlreadyUpToDate {
|
||||
log.Info().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue