Skip to content

Commit

Permalink
don't fail for envs that still used old format
Browse files Browse the repository at this point in the history
Signed-off-by: Ashraf Fouda <ashraf.m.fouda@gmail.com>
  • Loading branch information
ashraffouda committed Nov 6, 2024
1 parent 9f54368 commit f92c5ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/zos-update-worker/internal/update_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ func (w *Worker) updateZosVersion(network Network, manager client.Manager) error
err = json.Unmarshal([]byte(currentZosVersion), &chainVersion)
if err != nil {
log.Debug().Err(err).Msg("failed to unmarshal chain version")
chainVersion.Version = currentZosVersion
chainVersion.VersionLight = currentZosVersion
// shouldn't fail for env that still not updated version format
return nil
}

log.Debug().Msgf("getting substrate version %v for network %v", chainVersion.Version, network)
Expand All @@ -135,7 +135,6 @@ func (w *Worker) updateZosVersion(network Network, manager client.Manager) error
zosCurrent := fmt.Sprintf("%v/.tag-%v", w.src, chainVersion.Version)
zosLatest := fmt.Sprintf("%v/%v", w.dst, network)
// zos light
// to handle the environments that aren't updated yet (mainnet)
zosLightCurrent := fmt.Sprintf("%v/.tag-%v", w.src, chainVersion.VersionLight)
zosLightLatest := fmt.Sprintf("%v/%v-v4", w.dst, network)
// the link is like zosCurrent but it has the path relative from the symlink
Expand Down

0 comments on commit f92c5ee

Please sign in to comment.