Skip to content

Commit

Permalink
make Upgrade more talkative
Browse files Browse the repository at this point in the history
  • Loading branch information
kazhuravlev committed Dec 22, 2024
1 parent fa60627 commit ae810d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/workdir/workdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,8 @@ func (c *Workdir) Sync(ctx context.Context, maxWorkers int, tags []string) error
// Upgrade will upgrade only spec tools. and re-fetch latest versions of includes.
func (c *Workdir) Upgrade(ctx context.Context, tags []string) error {
for _, tool := range c.spec.Tools.Filter(tags) {
fmt.Println("Checking:", tool.Module, "...")

// FIXME(zhuravlev): remove all "is runtime supported" checks by checking it once at spec load.
rt, ok := c.runtimes[tool.Runtime]
if !ok {
Expand All @@ -400,10 +402,11 @@ func (c *Workdir) Upgrade(ctx context.Context, tags []string) error {
}

if !haveUpdate {
fmt.Println(">>> Have no updates")
continue
}

fmt.Println("Upgrade:", tool.Module, "=>", module)
fmt.Println(">>> Upgrade to:", module)

tool.Module = module

Expand Down

0 comments on commit ae810d5

Please sign in to comment.