Class: Builderator::Tasks::Version
Overview
Tasks to detect and increment package versions
Class Method Summary
collapse
Instance Method Summary
collapse
#run, #run_with_input, #run_without_bundler, #template, #thor_run
Class Method Details
.exit_on_failure? ⇒ Boolean
15
16
17
|
# File 'lib/builderator/tasks/version.rb', line 15
def self.exit_on_failure?
true
end
|
Instance Method Details
#bump(type = :auto, prerelease_name = nil) ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/builderator/tasks/version.rb', line 33
def bump(type = :auto, prerelease_name = nil)
unless Config.autoversion.create_tags && Config.autoversion.search_tags
say_status :disabled, 'Tag creation is disabled for this build. Not '\
'creating new SCM tags!', :red
current
return
end
say_status :bump, "by #{type} version"
Control::Version.bump(type, prerelease_name)
current
run "git tag #{Control::Version.current}"
run 'git push --tags'
end
|
#current ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/builderator/tasks/version.rb', line 20
def current
unless Config.autoversion.search_tags
say_status :disabled, 'Automatically detecting version information '\
'from SCM tags is disabled', :red
return
end
say_status :version, "#{Control::Version.current} (#{Control::Version.current.ref})"
Control::Version.write
Control::Version.set_config_version
end
|