You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bumping version with -M -m will need some extra logic within this function.
def choose_version(version)
if version =~ /(\d+)\.(\d+)\.(\d+)/
major = $1
minor = $2
patch = $3
major = major.to_i + 1 if config[:major]
minor = minor.to_i + 1 if config[:minor]
patch = patch.to_i + 1 if config[:patch]
version = "#{major}.#{minor}.#{patch}"
Chef::Log.debug("New version is #{version}")
else
Chef::Log.error("Version is in a format I cannot auto auto-update")
exit 1
end
version
end
Example, my current version is: 1.3.5
Bumping patch with -p will result into: 1.3.6 (seems ok)
Bumping minor with -m will result into: 1.4.5 (not ok, should be 1.4.0)
Bumping major with -M will result into: 2.3.5 (not ok, should be 2.0.0)
The text was updated successfully, but these errors were encountered:
Bumping version with -M -m will need some extra logic within this function.
def choose_version(version)
if version =~ /(\d+)\.(\d+)\.(\d+)/
major = $1
minor = $2
patch = $3
major = major.to_i + 1 if config[:major]
minor = minor.to_i + 1 if config[:minor]
patch = patch.to_i + 1 if config[:patch]
version = "#{major}.#{minor}.#{patch}"
Chef::Log.debug("New version is #{version}")
else
Chef::Log.error("Version is in a format I cannot auto auto-update")
exit 1
end
version
end
Example, my current version is: 1.3.5
Bumping patch with -p will result into: 1.3.6 (seems ok)
Bumping minor with -m will result into: 1.4.5 (not ok, should be 1.4.0)
Bumping major with -M will result into: 2.3.5 (not ok, should be 2.0.0)
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/19.
Bumping version with -M -m will need some extra logic within this function.
Example, my current version is: 1.3.5
Bumping patch with -p will result into: 1.3.6 (seems ok)
Bumping minor with -m will result into: 1.4.5 (not ok, should be 1.4.0)
Bumping major with -M will result into: 2.3.5 (not ok, should be 2.0.0)
The text was updated successfully, but these errors were encountered: