From 0ec4b3940a823ef9fc8541700d6350f9da6d8e5b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 12 Apr 2015 15:51:26 -0400 Subject: d: hub, if run from dir tree check git describe version info --- lib/sisu/develop/hub.rb | 2 +- lib/sisu/develop/hub_actions.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/sisu/develop/hub.rb b/lib/sisu/develop/hub.rb index 26a2af72..1ed7a8e7 100644 --- a/lib/sisu/develop/hub.rb +++ b/lib/sisu/develop/hub.rb @@ -202,7 +202,7 @@ module SiSU def actions_without_files actions=SiSU_Hub_Actions::HubActions.new(@opt) actions.report.version_info? - actions.report.version_dir? + actions.report.version_info_extra? actions.prepare.site? actions.prepare.sql? end diff --git a/lib/sisu/develop/hub_actions.rb b/lib/sisu/develop/hub_actions.rb index 7130615e..bc1ef948 100644 --- a/lib/sisu/develop/hub_actions.rb +++ b/lib/sisu/develop/hub_actions.rb @@ -67,6 +67,17 @@ module SiSU_Hub_Actions SiSU_Env::InfoAbout.new(@opt).sisu_version end end + def version_number_git? + if @opt.act[:version_info][:set]==:on \ + || @opt.act[:verbose][:set]==:on \ + || @opt.act[:verbose_plus][:set]==:on \ + || @opt.act[:maintenance][:set]==:on + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + ' ' + SiSU_is.git_version_info? + ).grey + end + end def version_dir? if @opt.act[:version_info][:set]==:on \ || @opt.act[:verbose][:set]==:on \ @@ -78,6 +89,25 @@ module SiSU_Hub_Actions ).grey end end + def version_info_extra? + if @opt.act[:version_info][:set]==:on \ + || @opt.act[:verbose][:set]==:on \ + || @opt.act[:verbose_plus][:set]==:on \ + || @opt.act[:maintenance][:set]==:on + if SiSU_is.git_version_info? + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + ' ' + File.dirname(__FILE__) + \ + ' vcr: ' + SiSU_is.git_version_info? + ).grey + else + SiSU_Screen::Ansi.new( + @opt.act[:color_state][:set], + ' ' + File.dirname(__FILE__) + ).grey + end + end + end self end def prepare -- cgit v1.2.3