lib/omnibus/git_cache.rb
def tag
      return @tag if @tag

      log.internal(log_key) { "Calculating tag" }

      # Accumulate an array of all the software projects that come before
      # the name and version we are tagging. So if you have
      #
      # build_order = [ 1, 2, 3, 4, 5 ]
      #
      # And we are tagging 3, you would get dep_list = [ 1, 2 ]
      dep_list = software.project.library.build_order.take_while do |dep|
        if dep.name == software.name && dep.version == software.version
          false
        else
          true
        end
      end

      log.internal(log_key) { "dep_list: #{dep_list.map(&:name).inspect}" }

      # This is the list of all the unqiue shasums of all the software build
      # dependencies, including the on currently being acted upon.
      shasums = [dep_list.map(&:shasum), software.shasum].flatten
      suffix  = Digest::SHA256.hexdigest(shasums.join("|"))
      @tag    = "#{software.name}-#{suffix}-#{SERIAL_NUMBER}"

      log.internal(log_key) { "tag: #{@tag}" }

      @tag
    end
def tag
      return @tag if @tag

      log.internal(log_key) { "Calculating tag" }

      # Accumulate an array of all the software projects that come before
      # the name and version we are tagging. So if you have
      #
      # build_order = [ 1, 2, 3, 4, 5 ]
      #
      # And we are tagging 3, you would get dep_list = [ 1, 2 ]
      dep_list = software.project.library.build_order.take_while do |dep|
        if dep.name == software.name && dep.version == software.version
          false
        else
          true
        end
      end

      log.internal(log_key) { "dep_list: #{dep_list.map(&:name).inspect}" }

      # This is the list of all the unqiue shasums of all the software build
      # dependencies, including the on currently being acted upon.
      shasums = [dep_list.map(&:shasum), software.shasum].flatten
      suffix  = Digest::SHA256.hexdigest(shasums.join("|"))
      @tag    = "#{software.name}-#{suffix}-#{SERIAL_NUMBER}"

      log.internal(log_key) { "tag: #{@tag}" }

      @tag
    end
Computes the tag for this cache entry.

 @return [String]