Documentation
¶
Overview ¶
Package upgrade plans and applies transactional upgrades to generated projects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FrameworkTemplate ¶
FrameworkTemplate represents a framework element template and its target path
func GetFrameworkTemplates ¶
func GetFrameworkTemplates(config *layout.ScaffoldConfig) []FrameworkTemplate
GetFrameworkTemplates returns the list of framework element templates These are the only files that get upgraded when running andurel upgrade
type GitAnalyzer ¶
type GitAnalyzer struct {
// contains filtered or unexported fields
}
GitAnalyzer represents git analyzer.
func NewGitAnalyzer ¶
func NewGitAnalyzer(projectRoot string) *GitAnalyzer
NewGitAnalyzer creates a new git analyzer.
func (*GitAnalyzer) GetFileFromInitialCommit ¶
func (g *GitAnalyzer) GetFileFromInitialCommit(relPath string) ([]byte, error)
GetFileFromInitialCommit returns file from initial commit.
func (*GitAnalyzer) GetModifiedFiles ¶
func (g *GitAnalyzer) GetModifiedFiles() (map[string]bool, error)
GetModifiedFiles returns modified files.
func (*GitAnalyzer) IsClean ¶
func (g *GitAnalyzer) IsClean() (bool, error)
IsClean reports whether clean.
type TemplateGenerator ¶
type TemplateGenerator struct {
// contains filtered or unexported fields
}
TemplateGenerator generates template artifacts.
func NewTemplateGenerator ¶
func NewTemplateGenerator(targetVersion string) *TemplateGenerator
NewTemplateGenerator creates a new template generator.
func (*TemplateGenerator) RenderFrameworkTemplates ¶
func (g *TemplateGenerator) RenderFrameworkTemplates( projectRoot string, config layout.ScaffoldConfig, extensions []string, ) (map[string][]byte, error)
RenderFrameworkTemplates renders all framework element templates and returns a map of file paths to their rendered content
type ToolSyncResult ¶ added in v1.0.0
ToolSyncResult represents the result of synchronizing tools
type UpgradeOptions ¶
UpgradeOptions configures upgrade behavior.
type UpgradeReport ¶
type UpgradeReport struct {
FromVersion string
ToVersion string
FilesReplaced int
FilesRemoved int
ToolsAdded int
ToolsRemoved int
ToolsUpdated int
AddedTools []string
RemovedTools []string
UpdatedTools []string
ToolMetadataChanges []string
ReplacedFiles []string
RemovedFiles []string
Diffs []FileDiff
DirtyWorktree bool
AlreadyCurrent bool
RepairAvailable bool
RepairApplied bool
Success bool
Error error
}
UpgradeReport represents upgrade report.
type Upgrader ¶
type Upgrader struct {
// contains filtered or unexported fields
}
Upgrader represents upgrader.
func NewUpgrader ¶
func NewUpgrader(projectRoot string, opts UpgradeOptions) (*Upgrader, error)
NewUpgrader creates a new upgrader.
func (*Upgrader) Execute ¶
func (u *Upgrader) Execute() (*UpgradeReport, error)
Execute performs the execute operation.