Skip to content

Commit 8b8ec68

Browse files
Apply suggestions from code review (logs)
1 parent 49be6c8 commit 8b8ec68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cli/alpha/internal/update/update.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,23 @@ func (opts *Update) Update() error {
7373
// 3. Installs old release
7474
// 4. Runs alpha generate with old release binary
7575
// 5. Commits the result
76+
log.Info("Preparing Ancestor branch with name %s", opts.AncestorBranch)
7677
if err := opts.prepareAncestorBranch(); err != nil {
7778
return fmt.Errorf("failed to prepare ancestor branch: %w", err)
7879
}
7980
// 1. Creates original branch
8081
// 2. Ensure that original branch is == Based on user’s current base branch content with
8182
// git checkout "main" -- .
8283
// 3. Commits this state
84+
log.Info("Preparing Original branch with name %s", opts.OriginalBranch)
8385
if err := opts.prepareOriginalBranch(); err != nil {
8486
return fmt.Errorf("failed to checkout current off ancestor: %w", err)
8587
}
8688
// 1. Creates upgrade branch from ancestor
8789
// 2. Cleans up the branch by removing all files except .git and PROJECT
8890
// 2. Regenerates scaffold using alpha generate with new version
8991
// 3. Commits the result
92+
log.Info("Preparing Upgrade branch with name %s", opts.UpgradeBranch)
9093
if err := opts.prepareUpgradeBranch(); err != nil {
9194
return fmt.Errorf("failed to checkout upgrade off ancestor: %w", err)
9295
}
@@ -95,6 +98,7 @@ func (opts *Update) Update() error {
9598
// 2. Merges in original (user code)
9699
// 3. If conflicts occur, it will warn the user and leave the merge branch for manual resolution
97100
// 4. If merge is clean, it stages the changes and commits the result
101+
log.Info("Preparing Merge branch with name %s and performing merge", opts.MergeBranch)
98102
if err := opts.mergeOriginalToUpgrade(); err != nil {
99103
return fmt.Errorf("failed to merge upgrade into merge branch: %w", err)
100104
}

0 commit comments

Comments
 (0)