summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2015-04-12 19:51:26 +0000
committerRalph Amissah <ralph@amissah.com>2015-04-13 20:39:36 +0000
commit0ec4b3940a823ef9fc8541700d6350f9da6d8e5b (patch)
tree4b53b57614a10254895e066c4afd81d857052a10
parentbin/sisu when run from dir tree, check git describe version info (diff)
downloadsisu-0ec4b3940a823ef9fc8541700d6350f9da6d8e5b.zip
sisu-0ec4b3940a823ef9fc8541700d6350f9da6d8e5b.tar.xz
d: hub, if run from dir tree check git describe version info
-rw-r--r--lib/sisu/develop/hub.rb2
-rw-r--r--lib/sisu/develop/hub_actions.rb30
2 files changed, 31 insertions, 1 deletions
diff --git a/lib/sisu/develop/hub.rb b/lib/sisu/develop/hub.rb
index 26a2af7..1ed7a8e 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 7130615..bc1ef94 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