Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
add more verbose output in update
Browse files Browse the repository at this point in the history
Refs: #26
  • Loading branch information
evgeni committed Mar 12, 2017
1 parent e089798 commit 7054ac5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cvmanager
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,20 @@ def update()
# never touch non-mentioned components
if @yaml[:ccv].is_a?(Hash) and @yaml[:ccv].has_key?(ccv['label']) and @yaml[:ccv][ccv['label']].has_key?(component['content_view']['label'])
desired_version = @yaml[:ccv][ccv['label']][component['content_view']['label']]
puts_verbose " Found new version #{desired_version} in CCV part of the config"
elsif @yaml[:cv].is_a?(Hash) and @yaml[:cv].has_key?(component['content_view']['label'])
desired_version = @yaml[:cv][component['content_view']['label']]
puts_verbose " Found new version #{desired_version} in CV part of the config"
else
desired_version = component['version']
puts_verbose " Did not find a new version, keeping #{desired_version}"
end

# instead of hard-coding the versions, the user can also specify "latest"
if desired_version == 'latest'
cvversions = @api.resource(:content_view_versions).call(:index, {:content_view_id => component['content_view']['id']})
desired_version = cvversions['results'][0]['version']
puts_verbose " Found #{desired_version} as the 'latest' version"
end

# if the version of the component does not match the one the user requested update it
Expand Down

0 comments on commit 7054ac5

Please sign in to comment.