lib/pdk/module/templatedir.rb
def metadata
        return {} unless @repo

        ref_result = PDK::CLI::Exec.git('--git-dir', File.join(@path, '.git'), 'describe', '--all', '--long', '--always')
        if ref_result[:exit_code].zero?
          { 'template-url' => @repo, 'template-ref' => ref_result[:stdout].strip }
        else
          {}
        end
      end
# Retrieve identifying metadata for the template.
#
# For git repositories, this will return the URL to the repository and
# a reference to the HEAD.
#
# @return [Hash{String => String}] A hash of identifying metadata.
#
# @api public
Retrieve identifying metadata for the template.
For git repositories, this will return the URL to the repository and
a reference to the HEAD.
Retrieve identifying metadata for the template . For git repositories this will return the URL to the repository and a reference to the HEAD .
def metadata
        return {} unless @repo
        ref_result = PDK::CLI::Exec.git('--git-dir', File.join(@path, '.git'), 'describe', '--all', '--long', '--always')
        if ref_result[:exit_code].zero?
          { 'template-url' => @repo, 'template-ref' => ref_result[:stdout].strip }
        else
          {}
        end
      end
def metadata return { } unless @repo ref_result = PDK :: CLI :: Exec . git ( '--git-dir' , File . join ( @path , '.git' ) , 'describe' , '--all' , '--long' , '--always' ) if ref_result [ :exit_code ] . zero? { 'template-url' => @repo , 'template-ref' => ref_result [ :stdout ] . strip } else { } end end
Retrieve identifying metadata for the template.
Retrieve identifying metadata for the template .
A hash of identifying metadata.
A hash of identifying metadata .
Hash{String => String}
api
None