d: hub, if run from dir tree check git describe version info
authorRalph Amissah <ralph@amissah.com>
Sun, 12 Apr 2015 19:51:26 +0000 (15:51 -0400)
committerRalph Amissah <ralph@amissah.com>
Mon, 13 Apr 2015 20:39:36 +0000 (16:39 -0400)
lib/sisu/develop/hub.rb
lib/sisu/develop/hub_actions.rb

index 26a2af72c0520d7d309507f9fe7ef550a16df742..1ed7a8e72765c67349dd341176005d3ef42c88a7 100644 (file)
@@ -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
index 7130615eef6b75289457f3a9bc780a6fc53605dd..bc1ef94879512d436ed13800e06e1c2462abfca8 100644 (file)
@@ -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