From 111ed9385351f2989214c4f1a3a0fb8815ad824b Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sun, 27 May 2018 12:44:53 +0200 Subject: [PATCH] @cosmetic Added release changelog config. --- .gitchangelog.rc.release | 16 +++++++++++----- changelog_release.tpl | 15 +++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 changelog_release.tpl diff --git a/.gitchangelog.rc.release b/.gitchangelog.rc.release index 38eaa4f4d..8504dc80f 100644 --- a/.gitchangelog.rc.release +++ b/.gitchangelog.rc.release @@ -151,7 +151,7 @@ subject_process = (strip | ReSub(r'^([cC]hang(ed?)?)(\s?:?\s)(.*)$', r'\4') | ReSub(r'^([fF]ix(ed?)?)(\s?:?\s)(.*)$', r'\4') | ReSub(r'^([uU]pdat(ed?)?)(\s?:?\s)(.*)$', r'\4') | - ReSub(r'#(\d{3,4})', r'\1') | SetIfEmpty("No commit message.") | ucfirst | final_dot) @@ -199,7 +199,7 @@ unreleased_version_label = "(unreleased)" ## #output_engine = rest_py #output_engine = mustache("restructuredtext") -output_engine = mustache("changelog.tpl") +output_engine = mustache("changelog_release.tpl") #output_engine = makotemplate("restructuredtext") @@ -254,14 +254,14 @@ include_merge = False # r'/(?P[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/', # idx=lambda m: m.start(1) # ) -#publish = stdout +publish = stdout def write_to_file(content): with open("CHANGELOG.md", "w+") as f: for chunk in content: f.write(chunk) -publish = write_to_file +#publish = write_to_file ## ``revs`` is a list of callable or a list of string @@ -302,4 +302,10 @@ publish = write_to_file # r"(?P[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")), # "HEAD" #] -revs = [] +# Gets the latest annoted tag and uses that as a base for new changes. + +import subprocess + +proc = subprocess.Popen(["git", "describe", "--abbrev=0", "--tags"], stdout=subprocess.PIPE) +out = str(proc.communicate()[0].strip(), "utf-8") +revs = [out+"..."] diff --git a/changelog_release.tpl b/changelog_release.tpl new file mode 100644 index 000000000..6f1e0bc4a --- /dev/null +++ b/changelog_release.tpl @@ -0,0 +1,15 @@ +**To receive further Pre-Release updates, please change the branch to develop. (Settings -> General (Show Advanced Settings) -> Updates -> Branch)** + +{{#versions}} + +{{#sections}} +{{{label}}} +{{#commits}} +- {{{subject}}} [{{{author}}}] +{{/commits}} + +{{/sections}} + +{{/versions}} + +**Note**: The OSX version does not automatically launch the browser. You have to go to http://localhost:7878 by yourself in a browser of your choice.