Changeset 7b36a6b in rtems-docs


Ignore:
Timestamp:
Feb 12, 2019, 11:57:10 PM (8 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
30b5468
Parents:
d721375
git-author:
Chris Johns <chrisj@…> (02/12/19 23:57:10)
git-committer:
Chris Johns <chrisj@…> (02/13/19 20:47:30)
Message:

waf: Use the release date in the coverpage

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • common/coverpage/coverpage.html

    rd721375 r7b36a6b  
    44  <title>RTEMS - Documentation</title>
    55  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    6   <meta name="created" content="11th Jan 2017 15:32" />
     6  <meta name="created" content="@VER_DATE@" />
    77  <meta name="description" content="" />
    88  <meta name="keywords" content="" />
     
    6161  <footer class="footer text-center">
    6262   <div class="container">
    63     Copyright 2017 RTEMS Project
     63    &copy; Copyright 1988, @COPYRIGHT_YEAR@ RTEMS Project and contributors.
    6464   </div>
    6565  </footer>
  • wscript

    rd721375 r7b36a6b  
    6767        o.write(js.replace('@CATALOGUE', xml))
    6868
     69def index_html(ctx):
     70    html = ''
     71    year = ctx.env.DATE.split()[2]
     72    for f in ctx.inputs:
     73        if f.abspath().endswith('.html'):
     74            with open(f.abspath()) as i:
     75                html += i.read()
     76    with open(ctx.outputs[0].abspath(), 'w') as o:
     77        html = html.replace('@COPYRIGHT_YEAR@', year)
     78        html = html.replace('@VER_DATE@', ctx.env.DATE)
     79        o.write(html)
    6980
    7081def build(ctx):
     
    89100
    90101    #
    91     # Build the catalogue, coverpage.js and install.
     102    # Build the catalogue, coverpage.js, index.html and install.
    92103    #
    93104    ctx(rule = catalogue,
     
    99110        source = ['wscript', 'catalogue.xml', 'common/coverpage/coverpage.js'])
    100111    ctx.install_as('${PREFIX}/coverpage.js', 'coverpage.js')
     112    ctx(rule = index_html,
     113        target = 'coverpage.html',
     114        source = ['wscript', 'common/coverpage/coverpage.html'])
     115    ctx.install_as('${PREFIX}/index.html', 'coverpage.html')
    101116    #
    102117    # Install the static content.
    103118    #
    104     ctx.install_as('${PREFIX}/index.html', 'common/coverpage/coverpage.html')
    105119    static_dir = ctx.path.find_dir('common/coverpage/static')
    106120    ctx.install_files('${PREFIX}/static',
Note: See TracChangeset for help on using the changeset viewer.