Beispiel #1
0
func applyChangelist(repo *tuf.TufRepo, cl changelist.Changelist) error {
	changes := cl.List()
	var err error
	for _, c := range changes {
		if c.Scope() == "targets" {
			applyTargetsChange(repo, c)
		}
		if err != nil {
			return err
		}
	}
	return nil
}
Beispiel #2
0
func applyChangelist(repo *tuf.TufRepo, cl changelist.Changelist) error {
	changes := cl.List()
	logrus.Debugf("applying %d changes", len(changes))
	for _, c := range changes {
		switch c.Scope() {
		case changelist.ScopeTargets:
			err := applyTargetsChange(repo, c)
			if err != nil {
				return err
			}
		default:
			logrus.Debug("scope not supported: ", c.Scope())
		}
	}
	return nil
}