aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-08-10 19:49:13 -0400
committerDavid Robillard <d@drobilla.net>2016-08-10 19:49:13 -0400
commit02480a60543bf9e90c87e6448138fac1dd19e34b (patch)
tree7cdf75654fde7e7fbd2f1aa1e298edffb871386d /wscript
parentaa63498f846c0a6f783c01c266321aaa0596a4c8 (diff)
downloadlv2-02480a60543bf9e90c87e6448138fac1dd19e34b.tar.xz
Add target to generate news posts for Pelican
Diffstat (limited to 'wscript')
-rw-r--r--wscript52
1 files changed, 40 insertions, 12 deletions
diff --git a/wscript b/wscript
index 452240f..504229c 100644
--- a/wscript
+++ b/wscript
@@ -530,6 +530,7 @@ def lint(ctx):
subprocess.call('cpplint.py --filter=+whitespace/comments,-whitespace/tab,-whitespace/braces,-whitespace/labels,-build/header_guard,-readability/casting,-build/include,-runtime/sizeof ' + i.abspath(), shell=True)
def test(ctx):
+ "runs unit tests"
autowaf.pre_test(ctx, APPNAME, dirs=['.'])
for i in ctx.path.ant_glob('**/*-test'):
name = os.path.basename(i.abspath())
@@ -555,27 +556,54 @@ class DistCheck(Dist, Scripting.DistCheck):
def archive(self):
Dist.archive(self)
-def dist(ctx):
+def posts(ctx):
+ "generates news posts in Pelican Markdown format"
subdirs = specdirs(ctx.path)
+ dev_dist = 'http://lv2plug.in/spec/lv2-%s.tar.bz2' % VERSION
+
+ try:
+ os.mkdir(os.path.join(out, 'posts'))
+ except:
+ pass
+ # Get all entries (as in dist())
+ top_entries = {}
+ for specdir in subdirs:
+ entries = autowaf.get_rdf_news(os.path.basename(specdir.abspath()),
+ ttl_files(ctx.path, specdir),
+ top_entries,
+ dev_dist = dev_dist)
+
+ entries = autowaf.get_rdf_news('lv2',
+ ['lv2/lv2plug.in/ns/meta/meta.ttl'],
+ None,
+ top_entries,
+ dev_dist = dev_dist)
+
+ autowaf.write_posts(entries,
+ { 'Author': 'drobilla' },
+ os.path.join(out, 'posts'))
+
+def dist(ctx):
+ subdirs = specdirs(ctx.path)
dev_dist = 'http://lv2plug.in/spec/lv2-%s.tar.bz2' % VERSION
# Write NEWS files in source directory
top_entries = {}
for specdir in subdirs:
- autowaf.write_news(os.path.basename(specdir.abspath()),
- ttl_files(ctx.path, specdir),
- specdir.abspath() + '/NEWS',
- top_entries,
- dev_dist = dev_dist)
+ entries = autowaf.get_rdf_news(os.path.basename(specdir.abspath()),
+ ttl_files(ctx.path, specdir),
+ top_entries,
+ dev_dist = dev_dist)
+ autowaf.write_news(entries, specdir.abspath() + '/NEWS')
# Write top level amalgamated NEWS file
- autowaf.write_news('lv2',
- ['lv2/lv2plug.in/ns/meta/meta.ttl'],
- 'NEWS',
- None,
- top_entries,
- dev_dist = dev_dist)
+ entries = autowaf.get_rdf_news('lv2',
+ ['lv2/lv2plug.in/ns/meta/meta.ttl'],
+ None,
+ top_entries,
+ dev_dist = dev_dist)
+ autowaf.write_news(entries, 'NEWS')
# Build archive
ctx.archive()