WIP: Some refactoring
This commit is contained in:
@ -81,10 +81,13 @@ func DiffReleases(src, dest release.Releases) (*Diff, error) {
|
||||
func (diff *Diff) Resolve(repositories repository.Repositories, path string) (lockfile.LockFile, error) {
|
||||
lockfile := lockfile.LockFile{}
|
||||
reposWished := repository.Repositories{}
|
||||
|
||||
for _, p := range diff.PreservedReleases {
|
||||
logrus.Infof("preserving %s", p.Release)
|
||||
lockfile = append(lockfile, p.LockEntry())
|
||||
reposWished = append(reposWished, p.RepositoryObj)
|
||||
}
|
||||
|
||||
for _, a := range diff.AddedReleases {
|
||||
logrus.Infof("adding %s", a.Release)
|
||||
lockfile = append(lockfile, a.LockEntry())
|
||||
@ -97,7 +100,11 @@ func (diff *Diff) Resolve(repositories repository.Repositories, path string) (lo
|
||||
reposWished = append(reposWished, u.RepositoryObj)
|
||||
}
|
||||
|
||||
// Repo Wished is the list of all repos that are required by the current setup, we need to
|
||||
for _, d := range diff.DeletedReleases {
|
||||
logrus.Infof("removing %s", d.Release)
|
||||
}
|
||||
|
||||
// Repo Wished is the list of all repos that are required by the current setup
|
||||
|
||||
// Existing repos are all the repos in the lockfile
|
||||
for _, repoExisting := range repositories {
|
||||
|
Reference in New Issue
Block a user