Skip to content

Commit

Permalink
update relnotes helper script (#1301)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrush committed May 21, 2024
1 parent e69d6ec commit 2aa608c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/gen_relnotes_variants_from_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ def timestamp(t=None,sep="_"):
def ascent_blurb():
return "[Ascent](https://github.com/Alpine-DAV/ascent) is flyweight in situ visualization and analysis runtime for multi-physics HPC simulations"

def release_date(release_id,src):
for l in src.split("\n"):
if l.startswith("## "):
sub_open = False
active_rel = proc_changelog_rel_id_line(l)
if active_rel == release_id:
# grab the date, it will be the last token
return l.split()[-1]
return "Unknown Date"


def gen_llnl_news_entry(release_id,src):
txt = "---\n"
txt += 'title: "Ascent {0} Released"\n'.format(release_id)
Expand All @@ -57,6 +68,7 @@ def gen_llnl_news_entry(release_id,src):
def gen_sphinx_entry(release_id,src):
txt = "v{0}\n".format(release_id)
txt += "---------------------------------\n\n"
txt += "* Released {0}\n".format(release_date(release_id,src))
txt += "* `Source Tarball <https://github.com/Alpine-DAV/ascent/releases/download/v{0}/ascent-v{0}-src-with-blt.tar.gz>`__\n\n".format(release_id)
txt += "* Docker Containers\n"
txt += " * ``alpinedav/ascent:{0}``\n".format(release_id)
Expand Down Expand Up @@ -91,7 +103,8 @@ def sphinx_translate_ticks(l):

def gen_github_entry(release_id,src):
txt = "# {0} Release Highlights\n\n".format(release_id)
txt += "(adapted from Ascent's [Changelog](https://github.com/Alpine-DAV/ascent/blob/develop/CHANGELOG.md) )\n"
txt += "(adapted from Ascent's [Changelog](https://github.com/Alpine-DAV/ascent/blob/develop/CHANGELOG.md) )\n\n"
txt += "Released {0}\n\n".format(release_date(release_id,src))
sub_open = False
active_rel = ""
for l in src.split("\n"):
Expand Down

0 comments on commit 2aa608c

Please sign in to comment.