Commit 2cee2f3c authored by FulcrandG's avatar FulcrandG
Browse files

Using jinja templates instead of wrappers in builder

parent ae416475
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -56,8 +56,6 @@ def get_description(job_path, job_name):
    return file.read()

def get_changelogs(job_path, job_name):
  changelogs = []

  latest_version = listdir(job_path + "/" + job_changelog_dir)[-1][0:-3]
  ### TODO add the url of the tag in here
  latest_url = "<TAG_URL>"
@@ -69,12 +67,13 @@ def get_changelogs(job_path, job_name):
    "version": latest_version
  }

  changelogs = []
  for version in listdir(job_path + "/" + job_changelog_dir)[::-1]:
    with open(job_path + "/" + job_changelog_dir + "/" + version) as file:
      changelogs.append({
        "version": version[0:-3],
        "url": version_url,
        "changelog": file.read()
        "changelog": file.readlines()
      })
  return (latest, changelogs)

+3 −1
Original line number Diff line number Diff line
@@ -11,7 +11,9 @@
* **[latest]({{ latest.url }})**(current -> `{{ latest.version }}`)
{% for version in changelogs %}
* **Tag `{{ version.version }}`**: {{ version.url }}
    {{ version.changelog }}
  {% for line in version.changelog %}
  {{ line }}
  {% endfor %}
{% endfor %}

{% if code_owner %}