ap_ds/{{ branch }}/{{ version }}
{% if branch and version %}
{# 将反斜杠替换为正斜杠 #}
{% set normalized_path = metadata.path.replace('\\', '/') %}
{% set relative_path = normalized_path.replace(branch + '/' + version + '/', '') %}
{% if relative_path and '/' in relative_path %}
{% set parts = relative_path.split('/') %}
{% for part in parts[:-1] %}
/{{ part }}
{% endfor %}
{% endif %}
{% endif %}
/{{ metadata.name }}