Class: Command::Version
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from CommandBase
execute!, #force_change_settings_function, help, #hook_call, #initialize, #load_local_settings, #tagname_to_ids
Class Method Details
.create_version_string ⇒ Object
16
17
18
19
20
|
# File 'lib/command/version.rb', line 16
def self.create_version_string
cv_path = File.expand_path("commitversion", Narou.get_script_dir)
commitversion = File.exist?(cv_path) ? File.read(cv_path) : `git describe --always`.strip + "(develop)"
"#{::Version} build #{commitversion}"
end
|
.oneline_help ⇒ Object
8
9
10
|
# File 'lib/command/version.rb', line 8
def self.oneline_help
"バージョンを表示します"
end
|
Instance Method Details
#execute(argv) ⇒ Object
12
13
14
|
# File 'lib/command/version.rb', line 12
def execute(argv)
puts self.class.create_version_string
end
|