def get_scm_data(ref = @config[:ref])
      @_version = ""
      @_date = Time.now
      begin
        if File.exist?(git_dir)
          @_version = `git --git-dir=#{git_dir} describe --tags #{ref} 2>&1`
          
          if $?.to_i > 0
            # HEAD is not a tagged verison, get the short SHA1 instead            
            @_version = `git --git-dir=#{git_dir} show #{ref} --format=format:"%h" -s 2>&1` 
          else
            # HEAD is a tagged version, if version is prefixed with "v" it will be stripped off
            @_version.gsub!(/^v/,"")
          end
          @_version.strip!
    
          # Get the date in epoch time
          date = `git --git-dir=#{git_dir} show #{ref} --format=format:"%ct" -s 2>&1`
          if date =~ /\d+/
            @_date = Time.at(date.to_i)
          else
            @_date = Time.now
          end
    
        end
      rescue RuntimeError => e
      end

    end
def get_scm_data(ref = @config[:ref])
      @_version = ""
      @_date = Time.now
      begin
        if File.exist?(git_dir)
          @_version = `git --git-dir=#{git_dir} describe --tags #{ref} 2>&1`
          
          if $?.to_i > 0
            # HEAD is not a tagged verison, get the short SHA1 instead            
            @_version = `git --git-dir=#{git_dir} show #{ref} --format=format:"%h" -s 2>&1` 
          else
            # HEAD is a tagged version, if version is prefixed with "v" it will be stripped off
            @_version.gsub!(/^v/,"")
          end
          @_version.strip!
    
          # Get the date in epoch time
          date = `git --git-dir=#{git_dir} show #{ref} --format=format:"%ct" -s 2>&1`
          if date =~ /\d+/
            @_date = Time.at(date.to_i)
          else
            @_date = Time.now
          end
    
        end
      rescue RuntimeError => e
      end

    end
Some hackery to determine if we're on a tagged version or not