Commit 93778290 authored by FulcrandG's avatar FulcrandG
Browse files

Using jinja templates instead of wrappers in builder

parent 1a5e4ede
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ def get_description(job_path, job_name):
    return file.read()

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

  latest_version = listdir(job_path + "/" + job_changelog_dir)[-1][0:-3]
  ### TODO add the url of the tag in here
@@ -66,14 +66,16 @@ def get_changelogs(job_path, job_name):

  latest = {
    "url": latest_url,
    "version": latest_version
  }

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

def get_license(job_path, job_name):
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
# Changelog
* **[latest]({{ latest.version }})**(current -> `{{ latest.url }}`)
{% for version in changelogs %}
* [{{ version }}]({{ version.url }})
* [{{ version.version }}]({{ version.url }})
  {{ version.changelog }}
{% endfor %}