anchor.diff:      <% end %>
       - get: buildpacks-ci
       - get: source
  -      resource: source-<%=dep_name%>-<%= line_hash['line'] %>
  +      resource: source-<%= dep_name.downcase %>-<%= line_hash['line'].downcase %>
         passed:
       <% if dep['copy-stacks'] %>
         <% dep['copy-stacks'].each do |copy_stack| %>
  -      - copy-<%=dep_name%>-<%=line_hash['line']%>-<%=copy_stack%>
  +      - copy-<%= dep_name.downcase %>-<%= line_hash['line'].downcase %>-<%= copy_stack.downcase %>
         <% end %>
       <% else %>
  -      - build-<%=dep_name%>-<%=line_hash['line']%>
  +      - build-<%= dep_name.downcase %>-<%= line_hash['line'].downcase %>
       <% end %>
         version: every
         trigger: true
       <% dep.fetch('monitored_deps', []).each do |monitored_dep_name| %>
  -    - get: source-<%=monitored_dep_name%>-latest
  -      trigger: true
  -      version: every
  -      passed: [<%= "build-#{dep_name}-#{line_hash['line']}" %>]
  +    - get: source-<%= monitored_dep_name.downcase %>-latest
  +      trigger: true
  +      version: every
  +      passed: [<%= "build-#{dep_name.downcase}-#{line_hash['line'].downcase}" %>]
       <% end %>
       - get: builds
       <% if bp_name.end_with?('cnb') %>
  
positive.code: <% dependencies.each do |dep_name, dep| %>
  <% version_lines = dep['buildpacks'].values.reduce([]) {|sum, bp| sum | get_version_lines(bp['lines'], ['latest'])} %>
      <% if is_multiline?(dep) %>
      - create-<%= dep_name %>-new-line-story
      <% end %>
      <% version_lines.each do |line| %>
      - create-<%=dep_name%>-<%= line %>-story
      <% if !is_child_cnb(dep_name) %>
      - accept-<%=dep_name%>-<%= line %>-story
      <% end %>
      <% dep['copy-stacks']&.each do |stack| %>
      - copy-<%=dep_name%>-<%= line %>-<%= stack %>
      <% end %>
      - build-<%=dep_name%>-<%= line %>
      <% end %>
      <% dep['buildpacks'].each do |bp_name, bp| %>
      <% get_version_lines(bp['lines'], ['latest']).each do |line| %>
      - update-<%=dep_name%>-<%= line %>-<%= bp_name %>
      <% end %>
  <% end %>
  <% end %>
  
  <% dependencies.each do |dep_name, dep| %>
  <% version_lines = dep['buildpacks'].values.reduce([]) {|sum, bp| sum | get_version_lines(bp['lines'], ['latest'])} %>
    - name: <%= dep_name %>
      jobs:
      <% if is_multiline?(dep) %>
      - create-<%= dep_name %>-new-line-story
      <% end %>
      <% version_lines.each do |line| %>
      - create-<%=dep_name%>-<%= line %>-story
      <% if !is_child_cnb(dep_name) %>
      - accept-<%=dep_name%>-<%= line %>-story
      <% end %>
      <% dep['copy-stacks']&.each do |stack| %>
      - copy-<%=dep_name%>-<%= line %>-<%= stack %>
      <% end %>
      - build-<%=dep_name%>-<%= line %>
      <% end %>
      <% dep['buildpacks'].each do |bp_name, bp| %>
      <% get_version_lines(bp['lines'], ['latest']).each do |line| %>
      - update-<%=dep_name%>-<%= line %>-<%= bp_name %>
      <% end %>
      <% end %>
  <% end %>
  
negative.code:         rebase: true
  
    <% if !is_child_cnb(dep_name) %>
  - name: accept-<%= dep_name.downcase %>-<%= line.downcase %>-story
    serial: true
    public: true
    plan:
    - in_parallel:
      - get: buildpacks-ci
      - get: source
        resource: source-<%= dep_name.downcase %>-<%= line.downcase %>
        trigger: true
        version: every
        passed:
      <% dep['buildpacks'].each do |bp_name, bp_data| %>
        <% if bp_uses_line?(bp_data, line) %>
          - update-<%= dep_name.downcase %>-<%= line.downcase %>-<%= bp_name.downcase %>
        <% end %>
      <% end %>
      <% dep.fetch('monitored_deps', []).each do |monitored_dep_name| %>
      - get: source-<%= monitored_dep_name.downcase %>-latest
        trigger: true
        version: every
        passed:
        <% dep['buildpacks'].each do |bp_name, bp_data| %>
          <% if bp_uses_line?(bp_data, line) %>
          - update-<%= dep_name.downcase %>-<%= line.downcase %>-<%= bp_name.downcase %>
          <% end %>
        <% end %>
      <% end %>
      - get: builds
    - do:
      - task: accept-<%= dep_name.downcase %>-<%= line.downcase %>-story
        file: buildpacks-ci/tasks/build-binary-new/accept.yml
        params:
          TRACKER_API_TOKEN: {{pivotal-tracker-api-token}}
  