// DoRelease runs the automated release process, consuming the given Repository's Metadata, updating module's go.mod files,
// creating a release JSON file, committing changes, tagging the repository, and pushing.
DoRelease runs the automated release process, consuming the given Repository's Metadata, updating module's go.mod files,
creating a release JSON file, committing changes, tagging the repository, and pushing.
// DoRelease runs the automated release process consuming the given Repository ' s Metadata updating module ' s go . mod files // creating a release JSON file committing changes tagging the repository and pushing .
func (r *Repository) DoRelease(releaseID string, push, interactive bool) error {
	if err := r.Metadata.CurrentVersions.isValid(r.git); err != nil {
		return fmt.Errorf("couldn't create a release: %v", err)
	}
	enc, bumps, err := r.DiscoverVersions(ReleaseVersionSelector)
	if err != nil {
		return fmt.Errorf("couldn't discover versions for release: %v", err)
	}
	err = r.resolveDependencies(&enc, bumps) 
	if err != nil {
		return fmt.Errorf("failed to resolve dependencies: %v", err)
	}
	rel, err := r.Metadata.CreateRelease(releaseID, bumps, false)
	if err != nil {
		return fmt.Errorf("failed to create release metadata: %v", err)
	}
	err = r.UpdateAllChangelogs(rel, false)
	if err != nil {
		return fmt.Errorf("failed to update changelogs: %v", err)
	}
	err = r.updateVersionFiles(enc)
	if err != nil {
		return fmt.Errorf("failed to update version files: %v", err)
	}
	if err = r.commit(releaseID); err != nil {
		return fmt.Errorf("failed to commit changes to local repo: %w", err)
	}
	if interactive {
		if err = confirmationPrompt("Enter \"yes\" to proceed with tagging"); err != nil {
			return err
		}
	}
	if err = r.tag(releaseID, bumps); err != nil {
		return fmt.Errorf("failed to tag and push to repo: %v", err)
	}
	if push {
		if err = r.git.Push(); err != nil {
			return err
		}
	}
	return nil
}
func ( r * Repository ) DoRelease ( releaseID string , push , interactive bool ) error { if err := r . Metadata . CurrentVersions . isValid ( r . git ) ; err != nil { return fmt . Errorf ( " " , err ) } enc , bumps , err := r . DiscoverVersions ( ReleaseVersionSelector ) if err != nil { return fmt . Errorf ( " " , err ) } err = r . resolveDependencies ( & enc , bumps ) if err != nil { return fmt . Errorf ( " " , err ) } rel , err := r . Metadata . CreateRelease ( releaseID , bumps , false ) if err != nil { return fmt . Errorf ( " " , err ) } err = r . UpdateAllChangelogs ( rel , false ) if err != nil { return fmt . Errorf ( " " , err ) } err = r . updateVersionFiles ( enc ) if err != nil { return fmt . Errorf ( " " , err ) } if err = r . commit ( releaseID ) ; err != nil { return fmt . Errorf ( " " , err ) } if interactive { if err = confirmationPrompt ( " \" \" " ) ; err != nil { return err } } if err = r . tag ( releaseID , bumps ) ; err != nil { return fmt . Errorf ( " " , err ) } if push { if err = r . git . Push ( ) ; err != nil { return err } } return nil }
DoRelease runs the automated release process, consuming the given Repository's Metadata, updating module's go.mod files,
creating a release JSON file, committing changes, tagging the repository, and pushing.
DoRelease runs the automated release process consuming the given Repository ' s Metadata updating module ' s go . mod files creating a release JSON file committing changes tagging the repository and pushing .
// update all dependencies on SDK modules to their latest versions.